Help me in solving PRB01 problem

My issue

in this problem, i am supposed to determine wheather the given number is prime or not.
when i am running it i am getting the correct output, but when i am submitting, it is showing wrong answer. whats wrong with my code below.

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t; 
	cin>>t; cout<<endl;
	    int n;
	    int count=0;
	    cin>>n; cout<<endl;
	    if(n%2!=0 && n%3!=0)  cout<<"yes"<<endl;
	   else cout<<"no"<<endl;
	return 0;

Problem Link: PRB01 Problem - CodeChef

your logic is not right
suppose n=25 your code will print yes but 25 is not a prime number

Use loop unless n/2 . don’t use endl after cin. its automatic create .