a, b = list(map(int, input().split())) q, r = divmod(b, a) print(q if r == 0 else "NO")