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