#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  while (A >= B) {
    if (!(A % B)) {
      cout << "YES" << "\n";
      return 0;
    }
    B += B;
  }
  cout << "NO" << "\n";
}