#include using namespace std; /* typedef */ typedef long long ll; typedef pair pii; /* constant */ const int INF = 1 << 30; const ll LINF = 1LL << 50; const int NIL = -1; const int MAX = 10000; const int mod = 1000000007; const double pi = 3.141592653589; /* global variables */ /* function */ void solve() { ll a, b; cin >> a >> b; while (b % 5 == 0) b /= 5; while (b % 2 == 0) b /= 2; if (a % b == 0) { cout << "No" << '\n'; } else cout << "Yes" << '\n'; } /* main */ int main(){ solve(); }