Officer stabbed, two shot in New York