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: import sys
  from sys import exit
  from collections import deque
  from bisect import (
      bisect_left,
      bisect_right,
      insort_left,
      insort_right,
  )  # func(リスト,値)
  from heapq import heapify, heappop, heappush
  from math import *
  
  sys.setrecursionlimit(10**6)
  INF = 10**20
  eps = 1.0e-20
  MOD = 10**9 + 7
  
  
  def mint():
      return map(int, input().split())
  
  
  def lint():
      return list(map(int, input().split()))
  
  
  def ilint():
      return int(input()), list(map(int, input().split()))
  
  
  def judge(x, l=["Yes", "No"]):
      print(l[0] if x else l[1])
  
  
  def lprint(l, sep="\n"):
      for x in l:
          print(x, end=sep)
  
  
  s, t = input(), input()
  
  
  def str_to_list(x):
      l = []
      for i in range(len(x)):
          l.append(ord(x[i]))
      return l
  
  
  def list_to_str(l):
      l = list(map(chr, l))
      return "".join(l)
  
  
  s = str_to_list(s)
  s.sort()
  s = list_to_str(s)
  t = str_to_list(t)
  t.sort(reverse=True)
  t = list_to_str(t)
  judge(s < t)
  
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"}]