#cf17finale. [cf17_final_e]Combination Lock

[cf17_final_e]Combination Lock

Problem Statement

Ringo has a string SS.

He can perform the following NN kinds of operations any number of times in any order.

  • Operation ii: For each of the characters from the LiL_i-th through the RiR_i-th characters in SS, 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.

Ringo loves palindromes and wants to turn SS into a palindrome. Determine whether this is possible.

Constraints

  • 1leqSleq1051 \\leq |S| \\leq 10^5
  • SS consists of lowercase English letters.
  • 1leqNleq1051 \\leq N \\leq 10^5
  • 1leqLileqRileqS1 \\leq L_i \\leq R_i \\leq |S|

Input

Input is given from Standard Input in the following format:

SS NN L1L_1 R1R_1 L2L_2 R2R_2 :: LNL_N RNR_N

Output

Print YES if it is possible to turn SS into a palindrome; print NO if it is impossible.


Sample Input 1

bixzja
2
2 3
3 6

Sample Output 1

YES

For example, if we perform Operation 11, 22 and 11 in this order, SS changes as bixzjabjyzjabjzakbbkaakb and becomes a palindrome.


Sample Input 2

abc
1
2 2

Sample Output 2

NO

Sample Input 3

cassert
4
1 2
3 4
1 1
2 2

Sample Output 3

YES