A, B = map(int, input().split()) q, r = divmod(B, A) if r == 0: print(q) else: print("NO")