var x, i : integer;
begin
writeln('nhap so nguyen x : ')
read(x);
if ( x < 2) then writeln(' x khong phai so nguyen to');
else if ( x > 2) then
begin
for i := 2 to ( x - 1) do
begin
if ( x mod i = 0) then writeln(' x khong la so nguyen to');
end;
end;
else
writeln(' x la so nguyen to');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n;
//chuongtrinhcon
bool ktnt(long long n)
{
if (n<2) return(false);
else
for (int i=2; i*i<=n;i++)
if (n%i==0) return (false);
return(true);
}
//chuongtrinhchinh
int main()
{
//freopen("KTSNT.INP","r",stdin);
//freopen("KTSNT.OUT","w",stdout);
cin>>n;
if (ktnt(n)==true) cout<<"1";
else cout<<"0";
return 0;
}