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