Gerrit Cole leaves after one-plus innings but Yankees still win 4-2