a,b = map(int,input().split()) for i in range(1, 101): if a%i==0 and i%b == 0: print('YES') break else: print('NO')