A,B = map(int,input().split()) for i in range(-100,101): if i*A==B: print(i) import sys sys.exit() print("NO")