#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } int main() { ll a, b; cin >> a >> b; ll t = gcd(a, b); b /= t; while (b % 2 == 0) { b /= 2; } while (b % 5 == 0) { b /= 5; } cout << (b == 1 ? "No": "Yes") << endl; return 0; }