#include <bits/stdc++.h>
using namespace std;
int main() {
  long long num1, num2, help;
  cin >> num1 >> num2;
  for (int i = 0; i <= num2; i++) {
    help = num1 % num2;
    num1 += help;
    if (num1 % num2 == 0) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
