#include #include void solve() { double A, B; std::cin >> A >> B; int a = A * 10000, b = B * 10000; if (a % 10000 != 0) { std::cout << "No\n"; } else { int cnt2 = 4, cnt5 = 4; while (cnt2 && b % 2 == 0) { cnt2--; b /= 2; } while (cnt5 && b % 5 == 0) { cnt5--; b /= 5; } a /= 10000; int p = 1; for (;cnt2--;) { p *= 2; } for (;cnt5--;) { p *= 5; } for (int i = 1; atcoder::pow_mod(i, p, 1 << 30) <= a; i++) { if (atcoder::pow_mod(i, p, 1 << 30) == a) { std::cout << "Yes\n"; return; } } std::cout << "No\n"; } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int testcases = 1; // std::cin >> testcases; for (;testcases--;) { solve(); } return 0; }