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