#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < 100; i++) {
    int t = a % b;
    if (t == 0) {
      cout << "Yes" << endl;
      return 0;
    }
    a = a + t;
  }
  cout << "No" << endl;
  return 0;
}
