#include <iostream> int main() { int num; std::cin >> num; bool isPrime = true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) { isPrime = false; break; } } if (isPrime) { std::cout << "是质数" << std::endl; } else { std::cout << "不是质数" << std::endl; } return 0; }