
#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,L,R) for(int i=L;i<R;i++)
using namespace std;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef vector<vector<int>> Graph;
typedef vector<string> Grid;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}

//#define DEBUG

//declaration area



//struct area

//function area

//main area
int main(){
    int h, m;
    cin >> h >> m;
    cout << (m%h==0 ? "Yes":"No") << endl;
}
/*







*/
#include <bits/stdc++.h>
using namespace std;
int m,h;
int main()
{
    cin>>m>>h;
    if(h%m==0) cout<<"Yes";
    else cout<<"No";
}
