{"problem":{"name":"Combination Lock","description":{"content":"Ringo has a string $S$. He can perform the following $N$ kinds of operations any number of times in any order. *   Operation $i$: For each of the characters from the $L_i$\\-th through the $R_i$\\-th c","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"cf17_final_e"},"statements":[{"statement_type":"Markdown","content":"Ringo has a string $S$.\nHe can perform the following $N$ kinds of operations any number of times in any order.\n\n*   Operation $i$: For each of the characters from the $L_i$\\-th through the $R_i$\\-th characters in $S$, replace it with its succeeding letter in the English alphabet. (That is, replace `a` with `b`, replace `b` with `c` and so on.) For `z`, we assume that its succeeding letter is `a`.\n\nRingo loves palindromes and wants to turn $S$ into a palindrome. Determine whether this is possible.\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 10^5$\n*   $S$ consists of lowercase English letters.\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq L_i \\leq R_i \\leq |S|$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n$N$\n$L_1$ $R_1$\n$L_2$ $R_2$\n$:$\n$L_N$ $R_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"cf17_final_e","tags":[],"sample_group":[["bixzja\n2\n2 3\n3 6","YES\n\nFor example, if we perform Operation $1$, $2$ and $1$ in this order, $S$ changes as `bixzja` → `bjyzja` → `bjzakb` → `bkaakb` and becomes a palindrome."],["abc\n1\n2 2","NO"],["cassert\n4\n1 2\n3 4\n1 1\n2 2","YES"]],"created_at":"2026-03-03 11:01:14"}}