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