#include <bits/stdc++.h> #define rep(a,n) for (ll a = 0; a < (n); ++a) using namespace std; //using namespace atcoder; using ll = long long; typedef pair<ll,ll> P; typedef pair<ll,P> PP; typedef vector<vector<int> > Graph; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e18; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); //input ll a,b; cin >> a >> b; ll g = __gcd(a,b); a /= g; b /= g; while(b%2==0){ b /= 2; } while (b%5==0){ b /= 5; } if(b==1){ cout << "No" << endl; } else{ cout << "Yes" << endl; } return 0; }