A,B = map(int, input().split(" ")) div, mod = divmod(B,A) if mod == 0: print(div) else: print("NO")