提交时间:2024-05-26 09:36:02

运行 ID: 149266

#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; if (n <= 1) cout << "No\n", exit(0); for (int i = 2; i * i <= n; i++) if (n % i == 0) cout << "No\n", exit(0); cout << "Yes\n"; return 0; }