import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B = map(int,read().split()) answer = 'YES' if A%B == 0 else 'NO' print(answer)