a, b = [int(x) for x in input().split()] t = [] for i in range(1, a + 1): if a % i == 0: t.append(i) for tt in t: if tt % b == 0: print("YES") exit() print("NO")