a, b = map(float, input().split()) kai = b / a print("NO") if kai.is_integer() == 0 else print(int(kai))