Heat wave prompts emergency response as Poland braces for 40C temperatures