import math n, z = map(int, input().split()) if n == 1: print("Yes" if z >= 2 else "No") elif n == 2: z_squared = z * z found = False for x in range(1, z): x_sq = x * x y_sq = z_squared - x_sq if y_sq <= 0: continue y = math.isqrt(y_sq) if y * y == y_sq: found = True break print("Yes" if found else "No") else: print("No")