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