a,b=[int(x) for x in input().split()] print(int(b/a)) if (b/a).is_integer() else print("NO")