n, z = map(int, input().split()) if n > 2: print("No") else: for i in range(z + 1): for j in range(z + 1): if i ** 2 + j ** 2 == z ** 2: exit(print("Yes")) print("No")