from collections import * from functools import * from itertools import * from heapq import * import sys,math input = sys.stdin.readline n,z = map(int,input().split()) if n>=3: print('No') exit() if n==1: if z>=2: print('Yes') else: print('No') exit() for i in range(1,1001): for j in range(1,1001): if i**2+j**2==z**2: print('Yes') exit() print('No')