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