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