A, B = map(int, input().strip().split(" ")) if abs(B) % abs(A) == 0: print(B//A) else: print("NO")