a,b = map(int,input().split()) a_yaku = [i for i in range(1,a+1) if a%i==0] b_divide = list(filter(lambda x:x%b==0,a_yaku)) print("YES") if len(b_divide)>0 else print("NO")