{"raw_statement":[{"iden":"problem statement","content":"You are given a string $S, T$ of length $N$ consisting of only uppercase English letters. You can perform the following operation $0$ or more times:\n\n*   If there exists a substring of $S$ such that `TIOT`, choose one and replace it with `ISCT`. (More precisely, if there exists $1 \\le i \\le N-3$ such that $S_{i}={}$`T`, $S_{i+1}={}$`I`, $S_{i+2}={}$`O`, $S_{i+3}={}$`T`, choose one and replace it with $S_{i}={}$`I`, $S_{i+1}={}$`S`, $S_{i+2}={}$`C`, $S_{i+3}={}$`T`.)\n\nCan you make $S$ equal to $T$ by performing the operation?\nYou have $Q$ test cases to answer."},{"iden":"constraints","content":"*   $1 \\leq Q \\leq 5 \\times 10^4$\n*   $4 \\le N \\le 2 \\times 10^5$\n*   $S$ and $T$ are strings of length $N$ consisting of uppercase English letters.\n*   The sum of $N$ across the test cases is at most $2 \\times 10^5$."},{"iden":"input","content":"The input is given in the following format:\n\n$Q$\n${case}_1$\n${case}_2$\n$\\vdots$\n${case}_Q$\n\nEach test cases is given in the following format:\n\n$N$\n$S$\n$T$"},{"iden":"sample input 1","content":"3\n10\nETIOTROPIC\nEISCTROPIC\n6\nBTIEOT\nBISECT\n10\nTIOTIOTIOT\nTIOISCISCT"},{"iden":"sample output 1","content":"Yes\nNo\nYes\n\nFor the first test case, you can match `ETIOTROPIC` to `EISCTROPIC` by performing the operation once as follows:\n\n*   The substring from the $2$ nd to $5$ th characters in `ETIOTROPIC` is `TIOT`, so replace it with `ISCT`.\n\nFor the second test case, you cannot match two strings through the operation."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}