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