Guest User

Untitled

a guest
Jan 18th, 2021
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define rep(i,x,y) for(int i=x;i<y;i++)
  5. #define repr(i,x,y) for(int i=x;i>=y;i--)
  6. #define int long long
  7. #define pb push_back
  8. #define ff first
  9. #define ss second
  10. #define sz(x) ((int)x.size())
  11. #define all(x) begin(x), end(x)
  12. #define memo(x,y) memset((x),(y),sizeof((x)))
  13. #define line cout<<"[At "<<__LINE__<<"]"<<endl;
  14.  
  15. using pii = pair<int, int>;
  16. using vi = vector<int>;
  17. using vii = vector<pair<int, int>>;
  18.  
  19. constexpr int mod = 1e9 + 7, N = 2e5 + 5;
  20. constexpr long long inf = 1e18;
  21. constexpr long double eps = 1e-6;
  22.  
  23. int sum = 0;
  24.  
  25. void Onigiri() {
  26.   int x;
  27.   cin >> x;
  28.   x += 4;
  29.   int cnt = 0;
  30.   for(int i = 3; i * i <= x; i++) {
  31.     if(x % i == 0) {
  32.       cnt++;
  33.       break;
  34.     }
  35.   }
  36.   if(cnt)cout << "YES";
  37.   else cout << "NO";
  38. }
  39. signed main() {
  40.   ios_base::sync_with_stdio(false);
  41.   cin.tie(NULL);
  42.   //cout.precision(10);cout<<fixed;
  43. #ifdef Zoro
  44.   freopen("/home/pritish/Competitive/in", "r", stdin);
  45.   freopen("/home/pritish/Competitive/out", "w", stdout);
  46. #endif
  47.  
  48.   int t = 1;
  49.   cin >> t;
  50.   while(t--) {
  51.     Onigiri();
  52.     cout << "\n";
  53.   }
  54.  
  55.   cerr << "\n" << (float)clock() / CLOCKS_PER_SEC * 1000 << " ms" << endl;
  56.   return 0;
  57. }
RAW Paste Data