A tropical storm blew out of the northern Philippines on Wednesday, leaving at least three people injured and thousands displaced and prompting authorities to shut down schools and government offices in the capital and several provinces prone to flooding and landslides.