A prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not.

The next prime number after x is the smallest prime number greater than x. For example, the next prime number after 2 is 3, and the next prime number after 3 is 5. Note that there is exactly one next prime number after each number. So 5 is not the next prime number for 2.

One cold April morning Panoramix predicted that soon Kakofonix will break free from his straitjacket, and this will be a black day for the residents of the Gallic countryside.

Panoramix's prophecy tells that if some day Asterix and Obelix beat exactly x Roman soldiers, where x is a prime number, and next day they beat exactly y Roman soldiers, where y is the next prime number after x, then it's time to wait for Armageddon, for nothing can shut Kakofonix up while he sings his infernal song.

Yesterday the Gauls beat n Roman soldiers and it turned out that the number n was prime! Today their victims were a troop of m Romans (m > n). Determine whether the Gauls should wait for the black day after today's victory of Asterix and Obelix?

Input

The first and only input line contains two positive integers — n and m (2 ≤ n < m ≤ 50). It is guaranteed that n is prime.

Pretests contain all the cases with restrictions 2 ≤ n < m ≤ 4.

Output

Print YES, if m is the next prime number after n, or NO otherwise.

Examples

Input

3 5


Output

YES

Input

7 11


Output

YES

Input

7 9


Output

NO
#include <bits/stdc++.h>
using namespace std;
long long int llin() {
  long long int x;
  scanf("%lld", &x);
  return x;
}
long double ldin() {
  long double x;
  scanf("%Lf", &x);
  return x;
}
char chin() {
  char ch;
  cin >> ch;
  return ch;
}
string strin() {
  string str;
  cin >> str;
  return str;
}
void No() { cout << "No" << endl; }
void NO() { cout << "NO" << endl; }
void Yes() { cout << "Yes" << endl; }
void YES() { cout << "YES" << endl; }
long long int fmin_i(vector<long long int> v) {
  long long int n = v.size(), mn_i = 0, mn_e = v[0];
  for (long long int i = 0; i <= n - 1; i++) {
    long long int MIN = min(mn_e, v[i]);
    if (MIN != mn_e) {
      mn_e = MIN;
      mn_i = i;
    }
  }
  return mn_i;
}
long long int fmax_i(vector<long long int> v) {
  long long int n = v.size(), mx_i = 0, mx_e = v[0];
  for (long long int i = 0; i <= n - 1; i++) {
    long long int MAX = max(mx_e, v[i]);
    if (MAX != mx_e) {
      mx_e = MAX;
      mx_i = i;
    }
  }
  return mx_i;
}
long long int lmin_i(vector<long long int> v) {
  long long int n = v.size(), mn_i = 0, mn_e = v[0];
  for (long long int i = 0; i <= n - 1; i++) {
    if (v[i] <= mn_e) {
      mn_e = v[i];
      mn_i = i;
    }
  }
  return mn_i;
}
long long int lmax_i(vector<long long int> v) {
  long long int n = v.size(), mx_i = 0, mx_e = v[0];
  for (long long int i = 0; i <= n - 1; i++) {
    if (v[i] >= mx_e) {
      mx_e = v[i];
      mx_i = i;
    }
  }
  return mx_i;
}
long long int min_e(vector<long long int> v) {
  long long int mn_e = v[0], n = v.size();
  for (long long int i = 0; i <= n - 1; i++) mn_e = min(mn_e, v[i]);
  return mn_e;
}
long long int max_e(vector<long long int> v) {
  long long int mx_e = v[0], n = v.size();
  for (long long int i = 0; i <= n - 1; i++) mx_e = max(mx_e, v[i]);
  return mx_e;
}
void make_prime(vector<bool>& v) {
  long long int I = 2, n = (long long int)v.size() - 1;
  for (long long int i = 0; i <= n; i++) v[i] = true;
  v[0] = false;
  v[1] = false;
  while (I <= n) {
    while (I <= n && !v[I]) I++;
    if (I > n) break;
    long long int i = 2;
    while (i * I <= n) {
      v[i * I] = false;
      i++;
    }
    I++;
  }
}
int main() {
  long long int n = llin(), m = llin();
  vector<bool> v(1001, false);
  make_prime(v);
  long long int np_count = 0;
  for (long long int i = n; i <= m; i++)
    if (v[i] == false) np_count++;
  if (v[n] && v[m] && (np_count + 2 == (m - n + 1)))
    YES();
  else
    NO();
}
