#include<bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long int n, b, a, i, c;
cin >> a;
for(i=1; i<=a; i++)
{
cin >> n;
b = n*(n+1);
b = b/2;
c = b%3;
if(c==0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
return 0;
}
using namespace std;
int main()
{
unsigned long long int n, b, a, i, c;
cin >> a;
for(i=1; i<=a; i++)
{
cin >> n;
b = n*(n+1);
b = b/2;
c = b%3;
if(c==0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
return 0;
}
Comments
Post a Comment