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