A, B = map(int, input().split()) for i in range(1, A + 1): if A % i == 0 and i % B == 0: print("YES") exit() print("NO")