A,B = map(int, input().split()) L = [] for i in range(1, A+1): if A%i == 0: L.append(i) ans = "NO" for x in L: if x%B == 0: ans = "YES" break print(ans)