Help me in solving PRB01 problem

My issue

plz tell me why it is failing in which test case?

My code

#include <iostream>
using namespace std;


int main() {
	// your code goes here
	
	
	
	 int t;
    cin>>t;

    while(t!=0) {
        int n;
        cin>>n;
        int i;
       for(i=2;i<n;i++){
       if(n%i==0){
           cout<<"no";
           break;
       }
       
       }
   if(i==n || n==1) {
       cout<<"yes";
   }
  
        t--;
        cout<<endl;
    }
	
	
	return 0;
}


Problem Link: PRB01 Problem - CodeChef

@krishpatel54
for test case
1
1
your output
yes
but correct output is
no