#include using namespace std; typedef int64_t i64; int main() { i64 a,b; cin>>a>>b; b/=gcd(a,b); while(b%2==0) { b/=2; } while(b%5==0) { b/=5; } if(b==1) { puts("No"); } else { puts("Yes"); } return 0; }