a, b = map(lambda x: int(x), input().split()) print(int(b/a) if b % a == 0 else "NO")