A, B = map(int, input().split()) a = [] for i in range(1, 101): if A % i == 0: a += [i] for j in a: if j % B == 0: print('YES') break else: print('NO')