One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, then by the end of the day the factory has to produce <image> (remainder after dividing x by m) more details. Unfortunately, no customer has ever bought any mythical detail, so all the details produced stay on the factory. 

The board of directors are worried that the production by the given plan may eventually stop (that means that there will be а moment when the current number of details on the factory is divisible by m). 

Given the number of details a on the first day and number m check if the production stops at some moment.

Input

The first line contains two integers a and m (1 ≤ a, m ≤ 105).

Output

Print "Yes" (without quotes) if the production will eventually stop, otherwise print "No".

Examples

Input

1 5


Output

No


Input

3 6


Output

Yes
#include <bits/stdc++.h>
using namespace std;
namespace fastIO {
template <typename T>
inline T read() {
  T f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
template <typename T>
inline void write(T x) {
  if (!x) {
    putchar('0');
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
}  // namespace fastIO
using namespace fastIO;
namespace fastOutput {
template <typename T>
inline void print_char(T x, char ch) {
  write(x), putchar(ch);
}
template <typename T>
inline void char_print(char ch, T x) {
  putchar(ch);
  write(x);
}
template <typename T>
inline void print_space(T x) {
  print_char(x, ' ');
}
template <typename T>
inline void space_print(T x) {
  char_print(' ', x);
}
template <typename T>
inline void println(T x) {
  print_char(x, '\n');
}
template <typename T>
inline void lnprint(T x) {
  char_print('\n', x);
}
template <typename T>
inline void print_array1(T *a, int n) {
  for (int(i) = (1); (i) <= (n); ++(i)) print_char(a[i], " \n"[i == n]);
}
template <typename T>
inline void print_array2(T *a, int n) {
  println(n), print_array1(a, n);
}
template <typename T>
inline void print_array3(T *a, int n) {
  for (int(i) = (n); (i) >= (1); --(i)) print_char(a[i], " \n"[i == 1]);
}
template <typename T>
inline void print_array4(T *a, int n) {
  println(n), print_array3(a, n);
}
template <typename T>
inline void special_print_array1(T *a, int n) {
  print_space(n), print_array1(a, n);
}
template <typename T>
inline void special_print_array2(T *a, int n) {
  print_space(n), print_array3(a, n);
}
inline void print_string_in_range(string s, int l, int r) {
  for (int(i) = (l); (i) <= (r); ++(i)) putchar(s[i]);
}
inline void print_chars_in_range(char *a, int l, int r) {
  for (int(i) = (l); (i) <= (r); ++(i)) putchar(a[i]);
}
}  // namespace fastOutput
using namespace fastOutput;
int n, m, cnt;
int main() {
  n = read<int>(), m = read<int>();
  while (++cnt <= 1000) {
    n += (n % m);
    if (!(n % m)) return puts("Yes"), 0;
  }
  return puts("No"), 0;
}
