#include <bits/stdc++.h>
using namespace std;
int sqrt(int N) {
int low = 1, high = N/2;
while (low <= high) {
long long mid = low + (high - low) / 2;
if (mid * mid == N) return mid;
else if (mid * mid < N) low = mid + 1;
else high = mid - 1;
}
return low;
}
int main() {
int n;
cin>>n;
if(n<=1) cout<< "false";
else{
int flag = 0;
int val = sqrt(n);
for(int i=2;i<=val;i++){
if (n % i == 0) {
cout << "false";
flag = 1;
break;
}
}
if (!flag)
cout << "true";
}
return 0;
}