import math a, b = map(int, input().split()) b /= math.gcd(a, b) c = 10**100 print("Yes" if c % b == 0 else "No")