#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  int n;
  cin >> a >> b;
  if (b < 10)
    n = a * 10 + b;
  else if (b == 100)
    n = a * 1000 + b;
  else
    n = a * 100 + b;
  int f = 1;
  for (int i = 1; i < n; i++) {
    if ((double)i == (double)(n / i)) {
      f = 0;
      break;
    }
  }
  if (f == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
