提交时间:2024-07-18 21:58:53

运行 ID: 156952

#include<bits/stdc++.h> using namespace std; int a,b,c,d[100005],e,f,g; bool o; bool cifang(int x) { if(x>0&&1072741824%x==0) return true; else return false; } int main() { cin>>a; for(b=1;b<=a;b++) { cin>>c; if(c==2) d[b]=1; else if(c%2==0) { o=0; for(e=2;e<=c;e+=2) if(cifang(e)==1&&cifang(c-e)==1) { o=1; break; } d[b]=o; } else d[b]=cifang(c-1); } for(b=1;b<=a;b++) { if(d[b]==1) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }