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