#include<cmath> #include<iostream> #define ll long long using namespace std; bool issq(ll n){ ll root = sqrt(n); return root*root == n ;
// 标准写法,其他写法有精度问题 } int main(){ int t; cin>>t; while (t--){ ll x; cin>>x; ll sum =0; while (x--){ ll y; cin>>y; sum+=y; } if (issq(sum)) cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }