n=int(input()) m=int(input()) if n%m==0: print("YES") else: print("NO")