NY to close nine hospitals, cut 4,100 beds