#include using namespace std; int main(){ int M, D, N; cin >> M >> D; N = 100*M+D; bool ok = true; for (int p = 2; p*p <= N; p++){ if (N%p == 0){ ok = false; } } if (ok) cout << "Yes" << endl; else cout << "No" << endl; }