A,B = input(),input() if (B%A)==0: print B/A else: print "NO"