a,b = (int(x) for x in input().split()) x = b//a if a*x==b: print(x) else: print("NO")