a,b=map(int,input().split()) f=False for i in range(1,10000): if a%i==0 and i%b==0: f=True break print('YES' if f else 'NO')