input: Write a function to determine if any two numbers in a given list add up to a specified number. If such a pair exists, return True; otherwise, return False. If the list is empty or contains only one element, return False.
  assert two_sum([1, 2, 3, 4], 5)==True
  assert two_sum([1, 2, 3, 4], 10)==False
  assert two_sum([1, 2, 3, 4, 5], 7)==True
  assert two_sum([1], 1)==False
  assert two_sum([], 0)==False
output: def two_sum(nums, target):
      seen = set()
      for num in nums:
          complement = target - num
          if complement in seen:
              return True
          seen.add(num)
      return False