n, z = map(int, input().split()) if n == 1: print('Yes') elif n == 2: for x in range(1100): for y in range(x, 1100): if x*x + y*y == z*z: print('Yes') exit() print('No') else: print('No')