fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. void A(){
  4. int n; cin>>n;
  5. for(int i=1;i*i<=n;++i)
  6. {
  7. if( (n-2*i)%(i+2)==0 && n!=2*i) {
  8. cout<<"YES"<<endl;
  9. return;
  10. }
  11. }
  12. cout<<"NO"<<endl;
  13. }
  14. int main() {
  15. int t; cin>>t;
  16. while(t--) A();
  17. }
  18.  
Success #stdin #stdout 0.01s 5540KB
stdin
4
2
5
6
12
stdout
NO
YES
NO
YES