a, b = [int(e) for e in input().split()] result = b % a if result == 0: print(b // a) else: print('NO')