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