#include #include #include #include #include #include #include #include #include #include using namespace std; long long gcd(long long a,long long b){ long long x=max(a,b),y=min(a,b); if(x%y==0)return y; else return gcd(y,x%y); } long long lcm(long long a,long long b){ return (a/gcd(a,b))*b; } int main(){ cin.tie(0); ios::sync_with_stdio(false); long long a , b; cin >> a >> b; long long temp_a = a; long long temp_b = b; a /= gcd(temp_a, temp_b); b /= gcd(temp_a, temp_b); while(1){ if(b % 2 != 0)break; b /= 2; } if(b == 1){ cout << "No" << endl; return 0; } while(1){ if(b % 5 != 0)break; b /= 5; } if(b == 1){ cout << "No" << endl; return 0; } cout << "Yes" << endl; return 0; }