fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t,n,c=0;
  6. cin>>t;
  7. while(t--)
  8. {
  9. cin>>n;
  10. for(int i=0;i<n;i++)
  11. {
  12. if(n%i==0)
  13. c=c+1;
  14. }
  15. if(c==2)
  16. cout<<"YES"<<"\n";
  17. else
  18. cout<<"NO"<<"\n";
  19. }
  20. return 0;
  21. }
  22.  
Runtime error #stdin #stdout 0s 15232KB
stdin
3
12
34
22
stdout
Standard output is empty