#include <iostream>
#include <cmath>
using namespace std;
int t, n, a[105];
int main(){
	cin>>t;
	while(t--){
		cin>>n;
		int suc = 0;
		for(int i=0; i<n; i++)
			cin>>a[i];
		for(int i=0; i<n; i++){
			int k = (int)sqrt((double)a[i]);
			if(k*k != a[i]){
				suc = 1;
				break;
			}
		}
		if(suc)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}
