def fen(n): arr = [] while int(n): t = n %10 arr.append(t) n =int(n/10) return arr def shouxing(n): a = fen(n) b = fen(n**2) a = a[::-1] k = len(a) p = b[:k] res = p[::-1] #print(a) c=-1 f=0 for i in res: c+=1 if a[c] != i: print('No!') f = 1 break if f == 0: print('Yes!') while True: try: n = int(input()) shouxing(n) except: break