#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  while ((b % 2) == 0) {
    b /= 2;
  }
  if (a % b == 0) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
