#include using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007,MAX=1<<18; const ll INF=1LL<<55; int main(){ int A,B;cin>>A>>B; bool ok=false; for(int i=1;i<=100;i++){ if(A%i==0&&i%B==0) ok=true; } if(ok) cout<<"YES"<