from sys import stdin ## input functions for me def ria(sep = ''): if sep == '' : return list(map(int, input().split())) else: return list(map(int, input().split(sep))) def rsa(sep = ''): if sep == '' : return input().split() else: return input().split(sep) def ri(): return int(input()) def rd(): return float(input()) def rs(): return input() ## ## main ## A, B = map(int, input().split()) chk = False for i in range(1,101): if A % i == 0 and i % B == 0: chk = True print("YES" if chk else "NO")