{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eRingo has a string \u003cvar\u003e\\(S\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003cp\u003eHe can perform the following \u003cvar\u003e\\(N\\)\u003c/var\u003e kinds of operations any number of times in any order.\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eOperation \u003cvar\u003e\\(i\\)\u003c/var\u003e: For each of the characters from the \u003cvar\u003e\\(L_i\\)\u003c/var\u003e-th through the \u003cvar\u003e\\(R_i\\)\u003c/var\u003e-th characters in \u003cvar\u003e\\(S\\)\u003c/var\u003e, replace it with its succeeding letter in the English alphabet. (That is, replace \u003ccode\u003ea\u003c/code\u003e with \u003ccode\u003eb\u003c/code\u003e, replace \u003ccode\u003eb\u003c/code\u003e with \u003ccode\u003ec\u003c/code\u003e and so on.) For \u003ccode\u003ez\u003c/code\u003e, we assume that its succeeding letter is \u003ccode\u003ea\u003c/code\u003e.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eRingo loves palindromes and wants to turn \u003cvar\u003e\\(S\\)\u003c/var\u003e into a palindrome.\r\nDetermine whether this is possible.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\leq |S| \\leq 10^5\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(S\\)\u003c/var\u003e consists of lowercase English letters.\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\leq N \\leq 10^5\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\leq L_i \\leq R_i \\leq |S|\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(S\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(N\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(L_1\\)\u003c/var\u003e \u003cvar\u003e\\(R_1\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(L_2\\)\u003c/var\u003e \u003cvar\u003e\\(R_2\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(:\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(L_N\\)\u003c/var\u003e \u003cvar\u003e\\(R_N\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003ePrint \u003ccode\u003eYES\u003c/code\u003e if it is possible to turn \u003cvar\u003e\\(S\\)\u003c/var\u003e into a palindrome; print \u003ccode\u003eNO\u003c/code\u003e if it is impossible.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003ebixzja\r\n2\r\n2 3\r\n3 6\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eFor example, if we perform Operation \u003cvar\u003e\\(1\\)\u003c/var\u003e, \u003cvar\u003e\\(2\\)\u003c/var\u003e and \u003cvar\u003e\\(1\\)\u003c/var\u003e in this order, \u003cvar\u003e\\(S\\)\u003c/var\u003e changes as \u003ccode\u003ebixzja\u003c/code\u003e → \u003ccode\u003ebjyzja\u003c/code\u003e → \u003ccode\u003ebjzakb\u003c/code\u003e → \u003ccode\u003ebkaakb\u003c/code\u003e and becomes a palindrome.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eabc\r\n1\r\n2 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNO\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003ecassert\r\n4\r\n1 2\r\n3 4\r\n1 1\r\n2 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\u003c/section\u003e\r\n"}}]}