#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
typedef unsigned long long ull;
const int mod = 998244353;


void solve(){
   int n;
   cin>>n;
   vector<int>v(n);
   for(auto&x:v)cin>>x;
   for(int i=0;i<n;i++){
    int lo=1,hi=101;
    while(lo<hi){
      int mid=lo+(hi-lo+1)/2;
      if(mid*mid<=v[i])lo=mid;
      else hi=mid-1;
    }
    if(lo*lo!=v[i]){
      cout<<"YES"<<endl;
      return;
    }
   }
   cout<<"NO"<<endl;

}



 

int main() {
  ios_base::sync_with_stdio(false); cin.tie(NULL);
  int tests = 1;
  cin>>tests;
  //int t=1;
  
  while (tests--) {
    
  // cout<<"Case #"<<t<<": ";
    solve();
   // t++;
  }
}
