#include using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define FOR(i,n,j) for(int i=(j);i<(n);++i) #define ssort(n) sort((n).begin(),(n).end()) #define rsort(n) sort((n).begin(),(n).end(),greater()) #define mp make_pair using ll=long long; using ld=long double; typedef pair P; typedef pair COST; #define repl(i,n) for(ll i=0;i<(n);++i) #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define YES cout << "YES" << endl #define NO cout << "NO" << endl using Graf=vector>; #define MAX 1000000 int main() { ll a,b; cin >> a >> b; while(a>=b){ a-=b; } if(a==0){ No; return 0; } if(b%a==0){ b/=a; a=1; } while(b%2==0){ b/=2; } if(b==1){ No; return 0; }else{ while(b%5==0){ b/=5; } } if(b==1){ No; }else{ Yes; } }