{"raw_statement":[{"iden":"problem statement","content":"For sequences $B=(B_1,B_2,\\dots,B_M)$ and $C=(C_1,C_2,\\dots,C_M)$, each of length $M$, consisting of non-negative integers, let the **XOR sum** $S(B,C)$ of $B$ and $C$ be defined as the sequence $(B_1\\oplus C_1, B_2\\oplus C_2, ..., B_{M}\\oplus C_{M})$ of length $M$ consisting of non-negative integers. Here, $\\oplus$ represents bitwise XOR.  \nFor instance, if $B = (1, 2, 3)$ and $C = (3, 5, 7)$, we have $S(B, C) = (1\\oplus 3, 2\\oplus 5, 3\\oplus 7) = (2, 7, 4)$.\nYou are given a sequence $A = (A_1, A_2, \\dots, A_N)$ of non-negative integers. Let $A(i, j)$ denote the contiguous subsequence composed of the $i$\\-th through $j$\\-th elements of $A$.  \nYou will be given $Q$ queries explained below and asked to process all of them.\nEach query gives you integers $a$, $b$, $c$, $d$, $e$, and $f$, each between $1$ and $N$, inclusive. These integers satisfy $a \\leq b$, $c \\leq d$, $e \\leq f$, and $b-a=d-c$. If $S(A(a, b), A(c, d))$ is **strictly** lexicographically smaller than $A(e, f)$, print `Yes`; otherwise, print `No`.\nWhat is bitwise XOR? The exclusive logical sum $a \\oplus b$ of two integers $a$ and $b$ is defined as follows.\n\n*   The $2^k$'s place ($k \\geq 0$) in the binary notation of $a \\oplus b$ is $1$ if exactly one of the $2^k$'s places in the binary notation of $a$ and $b$ is $1$; otherwise, it is $0$.\n\nFor example, $3 \\oplus 5 = 6$ (In binary notation: $011 \\oplus 101 = 110$). What is lexicographical order on sequences?A sequence $A = (A_1, \\ldots, A_{|A|})$ is said to be **strictly lexicographically smaller** than a sequence $B = (B_1, \\ldots, B_{|B|})$ if and only if 1. or 2. below is satisfied.\n\n1.  $|A|<|B|$ and $(A_{1},\\ldots,A_{|A|}) = (B_1,\\ldots,B_{|A|})$.\n2.  There is an integer $1\\leq i\\leq \\min{|A|,|B|}$ that satisfies both of the following.\n    *   $(A_{1},\\ldots,A_{i-1}) = (B_1,\\ldots,B_{i-1})$.\n    *   $A_i < B_i$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 5 \\times 10^5$\n*   $0 \\leq A_i \\leq 10^{18}$\n*   $1 \\leq Q \\leq 5 \\times 10^4$\n*   $1 \\leq a \\leq b \\leq N$\n*   $1 \\leq c \\leq d \\leq N$\n*   $1 \\leq e \\leq f \\leq N$\n*   $b - a = d - c$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format, where $\\text{query}_i$ represents the $i$\\-th query:\n\n$N$ $Q$\n$A_1$ $A_2$ $\\dots$ $A_N$\n$\\text{query}_1$\n$\\text{query}_2$\n$\\vdots$\n$\\text{query}_Q$\n\nThe queries are in the following format:\n\n$a$ $b$ $c$ $d$ $e$ $f$"},{"iden":"sample input 1","content":"4 5\n1 2 3 1\n1 3 2 4 1 4\n1 2 2 3 3 4\n1 1 2 2 3 4\n1 2 2 3 3 3\n1 4 1 4 1 1"},{"iden":"sample output 1","content":"No\nNo\nYes\nNo\nYes\n\nFor the first query, we have $A(1, 3) = (1, 2, 3)$ and $A(2, 4) = (2, 3, 1)$, so $S(A(1,3),A(2,4)) = (1 \\oplus 2, 2 \\oplus 3, 3 \\oplus 1) = (3, 1, 2)$. This is lexicographcially larger than $A(1, 4) = (1, 2, 3, 1)$, so the answer is `No`.  \nFor the second query, we have $S(A(1,2),A(2,3)) = (3, 1)$ and $A(3,4) = (3, 1)$, which are equal, so the answer is `No`."},{"iden":"sample input 2","content":"10 10\n725560240 9175925348 9627229768 7408031479 623321125 4845892509 8712345300 1026746010 4844359340 2169008582\n5 6 5 6 2 6\n5 6 1 2 1 1\n3 8 3 8 1 6\n5 10 1 6 1 7\n3 4 1 2 5 5\n7 10 4 7 2 3\n3 6 1 4 7 9\n4 5 3 4 8 9\n2 6 1 5 5 8\n4 8 1 5 1 9"},{"iden":"sample output 2","content":"Yes\nYes\nYes\nYes\nNo\nNo\nNo\nNo\nNo\nNo"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}