#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int64_t 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 << "Yes" << '\n'; } else { cout << "No" << '\n'; } return 0; }