#include using namespace std; long long gcd(long long a,long long b) { if(a % b == 0) { return b; } else { return gcd(b,a % b); } } int main() { long long a,b; cin >> a >> b; b /= gcd(a,b); while (b%2 == 0) { b /= 2; } while (b%5 == 0) { b /= 5; } cout << ((b == 1)?"Yes":"No") << endl; }