#include #define rep(i,n) for (int i=0; i<(n); ++i) using namespace std; using ll=long long; int main(){ int a,b; cin>>a>>b; int x=min(a,b); int y=max(a,b); bool ok=false; vectorz; for(int i=1; i<=y; ++i){ if(y%i==0){ z.push_back(i); } } rep(i,z.size()){ if(z[i]%x==0)ok=true; } cout<<(ok==true? "YES":"NO")<