input: Write a function to check if there exist any two numbers in the given list that add up to a specified target number. If such a pair exists, return True; otherwise, return False. If the list is empty, return False.
  
  assert two_sum([1, 2, 3, 4], 5)==True
  assert two_sum([1, 2, 3, 4], 8)==False
  assert two_sum([2, 7, 11, 15], 9)==True
  assert two_sum([1, 3, 4, 6], 10)==False
  assert two_sum([], 1)==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