#include using namespace std; long const mod = 1e9+7; int main(){ long a,b; cin >> a >> b; long g = gcd(a,b); a /= g; b /= g; bool chk = false; while(b%2==0)b/=2; while(b%5==0)b/=5; if(b==1)cout<<"Yes"; else cout<<"No"; }