{"problem":{"name":"Two Anagrams","description":{"content":"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 rear","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc082_b"},"statements":[{"statement_type":"Markdown","content":"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.\n\n## Constraints\n\n*   The lengths of $s$ and $t$ are between $1$ and $100$ (inclusive).\n*   $s$ and $t$ consists of lowercase English letters.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$s$\n$t$\n\n[samples]\n\n## Notes\n\nFor a string $a = a_1 a_2 ... a_N$ of length $N$ and a string $b = b_1 b_2 ... b_M$ of length $M$, we say $a < b$ for the lexicographic order if either one of the following two conditions holds true:\n\n*   $N < M$ and $a_1 = b_1$, $a_2 = b_2$, ..., $a_N = b_N$.\n*   There exists $i$ ($1 \\leq i \\leq N, M$) such that $a_1 = b_1$, $a_2 = b_2$, ..., $a_{i - 1} = b_{i - 1}$ and $a_i < b_i$. Here, letters are compared using alphabetical order.\n\nFor example, `xy` $<$ `xya` and `atcoder` $<$ `atlas`.","is_translate":false,"language":"English"}],"meta":{"iden":"abc082_b","tags":[],"sample_group":[["yx\naxy","Yes\n\nWe can, for example, rearrange `yx` into `xy` and `axy` into `yxa`. Then, `xy` $<$ `yxa`."],["ratcode\natlas","Yes\n\nWe can, for example, rearrange `ratcode` into `acdeort` and `atlas` into `tslaa`. Then, `acdeort` $<$ `tslaa`."],["cd\nabc","No\n\nNo matter how we rearrange `cd` and `abc`, we cannot achieve our objective."],["w\nww","Yes"],["zzz\nzzz","No"]],"created_at":"2026-03-03 11:01:14"}}