#include
using namespace std;
int main() {
int x;
int y;
cout << "整数値 x: ";
cin >> x;
y = x;
for(int i = 2; i < x-1; i ++){
//cout << "x/" << i <<" = " << i << "×" <<(x/i) << " + " << x%i << ";\n";
if((x % i) < y){
y = x%i;
}
}
if(!(y == 0)){
cout << x << "は素数です。YATTA!\n";
}else{
cout << x << "は素数じゃねえよ!ふざけんな!\n";
}
return 0;
}