(defmacro input []
  '(list (read-line) (read-line)))

(defn TwoAnagrams [[s t]]
  (if (neg?
        (compare
          (apply str (sort s))
          (apply str (reverse (sort t)))))
    "Yes"
    "No"))

(-> (input)
  TwoAnagrams
  println)