#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using ll = long long;
#define REP(i, n) for (ll i = 0; i < ll(n); i++)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; i++)

#define INF (int)1e9
#define LLINF (long long)1e12
#define MOD (int)1e9 + 7
#define PI 3.141592653589
#define PB push_back
#define F first
#define S second
#define co cout <<
#define en << endl;
#define __MAGIC__              \
  ios::sync_with_stdio(false); \
  cin.tie(nullptr);

#define YESNO(T)           \
  if (T)                   \
  {                        \
    cout << "YES" << endl; \
  }                        \
  else                     \
  {                        \
    cout << "NO" << endl;  \
  }
#define yesno(T)           \
  if (T)                   \
  {                        \
    cout << "yes" << endl; \
  }                        \
  else                     \
  {                        \
    cout << "no" << endl;  \
  }
#define YesNo(T)           \
  if (T)                   \
  {                        \
    cout << "Yes" << endl; \
  }                        \
  else                     \
  {                        \
    cout << "No" << endl;  \
  }

#define Graph vector<vector<int>>
#define PII pair<int, int>
#define VI vector<int>
#define VL vector<long long>
#define VVI vector<vector<int>>
#define VPII vector<pair<int, int>>
#define VS vector<string>
#define SIZE_OF_ARRAY(array) (sizeof(array) / sizeof(array[0]))
#define DDD fixed << setprecision(10)

using namespace std;
/*..................DEFINE GLOBAL VARIABLES...................*/

/*.....................DEFINE FUNCTIONS ......................*/
double power(double a, ll n)
{
  double r;
  ll abs_n;

  r = 1;
  abs_n = n < 0 ? -n : n;
  while (abs_n > 0)
  {
    if (abs_n % 2 == 1)
    {
      r *= a;
    }
    a *= a;
    abs_n /= 2;
  }

  return n >= 0 ? r : 1 / r;
}

double nthroot(double a, ll n)
{
  double x, y;

  // if (a <= 0 || n < 0)
  // {
  //   return 0;
  // }
  // if (n == 0)
  // {
  //   return 1;
  // }

  /* a > 0 かつ n > 0 の場合 */
  y = (a > 1) ? a : 1;
  do
  {
    x = y;
    y = ((n - 1) * x + a / power(x, n - 1)) / n;
  } while (y < x);

  return y;
}

ll is_power(ll a)
{
  ll i;

  if (a == 1)
  {
    return 1;
  }

  for (i = 2; i <= floor(log2(a)); i++)
  {
    if (power(floor(nthroot(a, i)), i) == a)
    {
      return 1;
    }
  }

  return 0;
}

/*.........................kemkemG0...........................*/

signed main()
{
  __MAGIC__
  int m, h;
  cin >> m >> h;
  if (h % m == 0)
  {
    co "Yes" en
  }
  else
  {
    co "No" en
  }

  return 0;
}

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

int main(){
    long m, h;
    long A;
    cin >> m >> h;
    A = h % m;
    if(A == 0)cout << "Yes" << endl;
    else cout << "No" << endl;
}