/** * @FileName a.cpp * @Author kanpurin * @Created 2020.09.11 21:26:49 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; template T _gcd(T a, T b) { return b ? _gcd(b, a%b) : a; } int main() { ll a,b;cin >> a >> b; ll g = _gcd(a,b); b /= g; while(b % 2 == 0) { b /= 2; } while(b % 5 == 0) { b /= 5; } if (b != 1) { puts("Yes"); } else { puts("No"); } return 0; }