#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long int i, j, k, l, a, b, c, d, t, flag = 0, n;
  cin >> a >> b;
  c = max(a, b);
  while (a <= c * c) {
    if (a % b == 0) {
      flag = 1;
    }
    a = a * 2;
  }
  if (flag == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
