#include<iostream>
#include<cstdlib>
#include<iomanip>
#include<cmath>
using namespace std;
int main ()
{ long long a , n , d ;
a = 2 ;
cin >> n ;
if( sqrt((double)n) < 2 )
cout<< "質數" << endl ;
else if( n % 2 == 0 )
cout<< "非質數" << endl ;
else if( sqrt((double)n) > 2 )
{ while( a < sqrt((double)n) )
{
a++ ;
d = n % a ;
if( d == 0 )
break ;
else
;
}
if( d != 0 )
cout<< "質數" << endl ;
else
cout<< "非質數" << endl ; }
}