New York declared state of emergency from flooding