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