{"raw_statement":[{"iden":"statement","content":"Two strings s and t of the same length are given. Determine whether it is possible to make t from s using exactly one reverse of some its substring.\n\nThe first line contains the string s, and the second — the string t. Both strings have the same length from 1 to 200000 characters and consist of lowercase Latin letters.\n\nOutput «_YES_», if it is possible to reverse some substring of s to make s equal to t, and «_NO_», otherwise.\n\n"},{"iden":"input","content":"The first line contains the string s, and the second — the string t. Both strings have the same length from 1 to 200000 characters and consist of lowercase Latin letters."},{"iden":"output","content":"Output «_YES_», if it is possible to reverse some substring of s to make s equal to t, and «_NO_», otherwise."},{"iden":"examples","content":"InputabcdefgabedcfgOutputYESInputabcdefgabdecfgOutputNO"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s, t \\in \\Sigma^n $ be two strings of equal length $ n $, where $ \\Sigma $ is the set of lowercase Latin letters and $ 1 \\leq n \\leq 200000 $.\n\n**Constraints**  \n$ |s| = |t| = n $\n\n**Objective**  \nDetermine whether there exist indices $ i, j \\in \\{1, \\dots, n\\} $ with $ i \\leq j $ such that reversing the substring $ s[i:j] $ results in $ t $. That is,  \n$$\nt = s[1:i-1] + \\text{reverse}(s[i:j]) + s[j+1:n]\n$$  \nOutput \"YES\" if such $ i, j $ exist; otherwise, output \"NO\".","simple_statement":"Given two equal-length strings s and t, can you make s equal to t by reversing exactly one substring of s? Output \"YES\" if possible, \"NO\" otherwise.","has_page_source":false}