A,B=map(int,input().split()) for x in range(B,1156468,B): if A%x==0: print("YES") break else: print("NO")