A, B = map(int, input().split()) q = B / A if q.is_integer(): print(int(q)) else: print("NO")