#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int a,b;cin>>a>>b; if(b==1){ cout<<"YES"< mapa,mapb; while(a>=hoge*hoge){ if(a%hoge==0){ a/=hoge; mapa[hoge]++; }else{ hoge++; } } mapa[a]++; hoge=2; while(b>=hoge*hoge){ if(b%hoge==0){ b/=hoge; mapb[hoge]++; }else{ hoge++; } } mapb[b]++; for(auto itr=mapb.begin();itr!=mapb.end();++itr){ //cout<<"key="<first<<",val="<second<<"\n"; if(itr->second>=mapa[itr->first]){ cout<<"NO"<