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