n,z = mp(int,input().split()) import sys if n >= 3: print('No') exit() if n == 1: if z > 1: print('No') exit() else: print('Yes') exit() s =set() for x in range(1,z): s.add(x * x) for x in range(1,z): if z * z - x * x in s: print('Yes') exit() print('No')