output_description: If it is possible to satisfy s' < t', print `Yes`; if it is not, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      s
      t
attempt: from itertools import zip_longest
  
  def twoAnagrams(s, t):
      s_str = ''.join(sorted(s))
      t_str = ''.join(sorted(t, reverse=True))
  
      if t_str.startswith(s_str):
          if len(s_str) < len(t_str):
              return True
          # this implies s and t is the same string
          else:
              return False
  
      for s_chr,t_chr in zip_longest(s_str, t_str):
          if s_chr is None:
              return True
          elif t_chr is None or t_chr < s_chr:
              return False
          else s_chr < t_chr:
              return True
  
  
  s = list(input())
  t = list(input())
  
  print('Yes' if twoAnagrams(s,t) else 'No')
  
problem_description: Statement
  
  You are given strings s and t, consisting of lowercase English letters. You
  will create a string s' by freely rearranging the characters in s. You will
  also create a string t' by freely rearranging the characters in t. Determine
  whether it is possible to satisfy s' < t' for the lexicographic order.
samples: [{"input": "yx\n    axy", "output": "Yes\n    \n\nWe can, for example, rearrange `yx` into `xy` and `axy` into `yxa`. Then, `xy`\n< `yxa`.\n\n* * *"}, {"input": "ratcode\n    atlas", "output": "Yes\n    \n\nWe can, for example, rearrange `ratcode` into `acdeort` and `atlas` into\n`tslaa`. Then, `acdeort` < `tslaa`.\n\n* * *"}, {"input": "cd\n    abc", "output": "No\n    \n\nNo matter how we rearrange `cd` and `abc`, we cannot achieve our objective.\n\n* * *"}, {"input": "w\n    ww", "output": "Yes\n    \n\n* * *"}, {"input": "zzz\n    zzz", "output": "No"}]