a = list(map(int, input().split())) b = a[1] / gcd(a[0], a[1]) b *= 10**12345678910 print("Yes" if b.is_integer() else "No")