N = input().split() a = float(N[0]) b = float(N[1]) kai = b / a print("NO") if kai.is_integer() == False else print(int(kai))