#include<bits/stdc++.h>
using namespace std;

#define IOS         ios_base::sync_with_stdio(false);cin.tie(NULL);
#define ll            long long
#define t()           int t;cin>>t;while(t--)
#define lt()          long long int t;cin>>t;while(t--)
#define ff              first
#define ss              second
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];

#define  nik(i,k,n)    for (int i = k; i < (n); ++i)

void fast()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("inp.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
}

void solve()
{
	ll n, m;
	cin >> n>> m;
	if(m%n == 0){
		cout << "Yes" <<endl;
		return ;
	}
	cout << "No" << endl;

}
int32_t main()
{
	fast();
	//lt(){
		solve();
	//}
	return 0;
}
#include<bits/stdc++.h>
#define int long long
using namespace std;

const int maxn=200005;
const int inf=1ll<<60;

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0),cout.tie(0);
	int a,b;
	cin>>a>>b;
	cout<<(b%a==0?"Yes":"No");
}