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