a, b = map(int, input().split()) mx, mi = max(a, b), min(a, b) print("YES" if mx % mi == 0 else "NO")