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