X =raw_input() A,B =X.split(' ') if (int(B)%int(A))==0: print int(B)/int(A) else: print "NO"