rr = raw_input rri = lambda: int(raw_input()) rrm = lambda: map(int, raw_input().split()) A, B = rrm() print "YES" if A%B == 0 else "NO"