#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define MOD 1000000007
#define pb push_back
#define fi first
#define se second
#define endl "\n"
#define all(v) v.begin(), v.end()
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPII;
typedef vector<VI> VVI;
const string YESNO[2] = {"NO", "YES"};
const string YesNo[2] = {"No", "Yes"};
const string yesno[2] = {"no", "yes"};
void YES(bool t = 1) { cout << YESNO[t] << endl; }
void Yes(bool t = 1) { cout << YesNo[t] << endl; }
void yes(bool t = 1) { cout << yesno[t] << endl; }

const int mxN = 5e5+5;
int n,m,h;
int a[mxN];
string s,t;
array<int,2> b[mxN];

void code()
{
    cin>>m>>h;

    Yes(h%m==0);

    /*
        
        
   */
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int t=1;
    // cin>>t;
    while(t--) code();
}
#include <iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <iomanip>
#include <vector>

int main() {
    int M, H;
    cin >> M >> H;
    
    if (H % M == 0) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

