Julius Caesar and Kazusa

아직 제출이 없습니다시간 제한13초메모리 제한256 MB

문제

Have you ever heard of the Caesar cipher? It is one of the simplest and best-known encryption techniques. Named after Julius Caesar, he used this cipher to communicate with his generals. 

Caesar cipher is a type of substitution cipher in which each letter in the plaintext is shifted a certain number of places down the alphabet. The alphabet is considered wrapped around. For example, with a shift of 11 in the Latin alphabet, A would be replaced by B, B would become C, Z would be A, and so on.

Kazusa now has an array aa of integers a_1,a_2,,a_na\_1,a\_2,\dots,a\_n of length nn, with each a_ia\_i in the range \[0,65,536)\[0,65\\,536), and she wants to encrypt it using Caesar cipher several times. She selects an interval \[l,r]\(1\leq l\leq r\leq n) each time, and makes an encryption using Caesar cipher with shift of 11 to the numbers in the interval. Formally, for all lirl\leq i\leq r, this transforms a_ia\_i into (a_i+1)mod65,536(a\_i+1) \bmod 65\\,536

However, while Kazusa is encrypting the array, her sister, Setsuna, raises some questions about the array. Each query asks on the current copy of the array, where zero or more encryptions using Caesar cipher has been done. Each query is given by three integers x,y,Lx, y, L, which asks whether the two strings a_x,a_x+1a_x+L1a\_x,a\_{x+1} \dots a\_{x+L-1} and a_y,a_y+1a_y+L1a\_y,a\_{y+1} \dots a\_{y+L-1} are same.

While Kazusa is busying doing the encryption, she has no time to answer these queries. Could you please help her?

입력

The first line contains two integers n,qn,q (1n,q500,000)(1 \leq n, q \leq 500\\,000), denoting the size of the array and the number of operations, respectively. The second line contains nn integers a_1,a_2,,a_na\_1,a\_2,\dots,a\_n (0a_i<65,536)(0 \leq a\_i < 65\\,536), denoting the initial array. The next qq lines describe the operations, each operation is in one of the two following types:

  • Operation of type 1 contains three integers 1,l,r1, l, r (1lrn)(1 \leq l \leq r \leq n), meaning that Kazusa made an encryption using Caesar cipher with shift 11 to the numbers in the interval \[l,r]\[l,r];
  • Operation of type 2 contains four integers 2,x,y,L2, x, y, L (1x,yn,maxx,y+L1n)(1 \leq x, y \leq n,\max \\{x,y\\}+L-1 \leq n), meaning that Setsuna asked a query whether the two strings are the same.

출력

For each operation of type 2, if the two strings are same, please print yes in one line; otherwise print no.

힌트

The first test case is explained below.

OperationArrayDescription
1[1,2,1,2,1][1,2] and [2,1] are different
2[1,2,1,2,1][1,2,1] and [1,2,1] are same
3[2,2,1,2,1]the first element is shifted by one
4[2,2,2,3,2]the third to the fifth elements are shifted by one
5[2,2,2,3,2][2,2,2,3] and [2,2,3,2] are different
6[2,2,2,3,2][2,2] and [2,2] are same