import math b, a = map(int, input().split()) print("NO" if a / b != math.ceil(a / b) else a / b)