#include <bits/stdc++.h>

using namespace std;

int m, n;

int main() {
  cin >> m >> n;
  cout << (n % m ? "No" : "Yes");
  return 0;
}
#include <bits/stdc++.h>
#include <time.h>
#include <math.h>

using namespace std;

// English Motherfucker, Do you speak it?

#define fast                          \
	ios_base::sync_with_stdio(false); \
	cin.tie(0);                       \
	cout.tie(0);
#define nl "\n"

#define l long
#define ll long long
#define dou double
#define ld long double
#define str string
#define vi vector<int>
#define vc vector<char>
#define vll vector<ll>
#define vd vector<dou>
#define vstr vector<str>
#define si stack<int>
#define sc stack<char>
#define sll stack<ll>
#define sd stack<dou>
#define sstr stack<str>
#define qi queue<int>
#define qc queue<char>
#define qll queue<ll>
#define qd queue<dou>
#define qstr queue<str>
#define sei set<int>
#define sec set<char>
#define sell set<ll>
#define sed set<dou>
#define sestr set<str>
#define msi multiset<int>
#define msc multiset<char>
#define msll multiset<ll>
#define msd multiset<dou>
#define msstr multiset<str>
#define mii map<int, int>
#define mcc map<char, char>
#define mllll map<ll, ll>
#define mdd map<dou, dou>
#define mstrstr map<str, str>
#define pii pair<int, int>
#define pcc pair<char, char>
#define pllll pair<ll, ll>
#define pdd pair<dou, dou>
#define pstrstr pair<str, str>

#define pub push_back
#define pob pop_back
#define mp make_pair
#define min3(a, b, c) min(min(a, b), c)
#define max3(a, b, c) max(max(a, b), c)

const ll MOD9 = 1000000007;
const dou pi = acos(-1.0);
const dou PI = 3.1415926535897932384626433832795;
const dou EX = 2.7182818284590452353602875;
const int INFI = 1e9;

ll maxs(set<ll> s)
{
	ll a;
	a=*(--s.end());
	/*for(auto i=s.begin();i!=s.end();++i)
	{
		if((*i)>a)
		{
			a=(*i);
		}
	}*/
	//cout<<a<<" ";
	return a;
}

ll mexs(set<ll> s)
{
	ll a;
	a=0;
	/*while(1)
	{
		if(s.find(a)!=s.end())
		{
			a++;
		}
		else
		{
			break;
		}
	}*/
	if(*(s.begin())!=0)
	{
		a=0;
	}
	else if(maxs(s)==(s.size()-1))
	{
		a=maxs(s)+1;
	}
	else
	{
		ll j=0;
		for(auto i=s.begin();i!=s.end();i++)
		{
			if(*(i)==j)
			{
				j++;
			}
			else
			{
				a=j;
				break;
			}
		}
	}
	return a;
}

void solve()
{
	int m,h;
	cin>>m>>h;
	if(h%m==0)
	{
		cout<<"Yes"<<nl;
	}
	else
	{
		cout<<"No"<<nl;
	}
}

int main()
{
	fast;
	ll t;
	//cin>>t;
	t=1;
	while (t--)
	{
		solve();
	}
	return 0;
}