#include using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) ULL GCD(ULL a, ULL b) { return b ? GCD(b, a % b) : a; } int main() { ULL a, b; cin >> a >> b; b /= GCD(a, b); while (b % 2 == 0) b /= 2; while (b % 5 == 0) b /= 5; if (b == 1) cout << "No" << endl; else cout << "Yes" << endl; return 0; }