#include #include #include #include using namespace std; int main() { long long a = 0, b = 0; { string sa, sb; cin >> sa >> sb; for (int i = 0; i < sa.size(); ++i) { if (sa[i] == '.' || sa[i] == '-') continue; a = a * 10 + sa[i] - '0'; } for (int i = 0; i < sb.size(); ++i) { if (sb[i] == '.' || sb[i] == '-') continue; b = b * 10 + sb[i] - '0'; } if (sa[0] == '-') a = -a; if (sb[0] == '-') b = -b; } const int base = 10000; map p; p[2] = -4; p[5] = -4; for (long long i = 2; i * i <= a; ++i) { if (a % i) continue; int cnt = 0; while (a % i == 0) { ++cnt; a /= i; } p[i] += cnt; } int ans = 1; for (auto [p, cnt] : p) { long long tmp = cnt * b; if (tmp % base != 0 || tmp < 0) { ans = 0; break; } } cout << (ans ? "Yes" : "No") << endl; }