a,b = map(int,input().split()) c = b/a if c == int(c): print(int(c)) else: print("NO")