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