import math for v in [1]*int(input()): input() for a in list(map(int,input().split())): v*=a print('YNeos'[v!=math.isqrt(v)**2::2])