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