Adieu l'ami.

Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's makeshift residence.

The space is represented by a rectangular grid of *n* × *m* cells, arranged into *n* rows and *m* columns. The *c*-th cell in the *r*-th row is denoted by (*r*, *c*).

Oshino places and removes barriers around rectangular areas of cells. Specifically, an action denoted by "1 *r*<sub class="lower-index">1</sub> *c*<sub class="lower-index">1</sub> *r*<sub class="lower-index">2</sub> *c*<sub class="lower-index">2</sub>" means Oshino's placing barriers around a rectangle with two corners being (*r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>) and (*r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub>) and sides parallel to squares sides. Similarly, "2 *r*<sub class="lower-index">1</sub> *c*<sub class="lower-index">1</sub> *r*<sub class="lower-index">2</sub> *c*<sub class="lower-index">2</sub>" means Oshino's removing barriers around the rectangle. Oshino ensures that no barriers staying on the ground share any common points, nor do they intersect with boundaries of the *n* × *m* area.

Sometimes Koyomi tries to walk from one cell to another carefully without striding over barriers, in order to avoid damaging various items on the ground. "3 *r*<sub class="lower-index">1</sub> *c*<sub class="lower-index">1</sub> *r*<sub class="lower-index">2</sub> *c*<sub class="lower-index">2</sub>" means that Koyomi tries to walk from (*r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>) to (*r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub>) without crossing barriers.

And you're here to tell Koyomi the feasibility of each of his attempts.
The first line of input contains three space-separated integers *n*, *m* and *q* (1 ≤ *n*, *m* ≤ 2 500, 1 ≤ *q* ≤ 100 000) — the number of rows and columns in the grid, and the total number of Oshino and Koyomi's actions, respectively.

The following *q* lines each describes an action, containing five space-separated integers *t*, *r*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">1</sub>, *r*<sub class="lower-index">2</sub>, *c*<sub class="lower-index">2</sub> (1 ≤ *t* ≤ 3, 1 ≤ *r*<sub class="lower-index">1</sub>, *r*<sub class="lower-index">2</sub> ≤ *n*, 1 ≤ *c*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">2</sub> ≤ *m*) — the type and two coordinates of an action. Additionally, the following holds depending on the value of *t*: 
 -  If *t* = 1: 2 ≤ *r*<sub class="lower-index">1</sub> ≤ *r*<sub class="lower-index">2</sub> ≤ *n* - 1, 2 ≤ *c*<sub class="lower-index">1</sub> ≤ *c*<sub class="lower-index">2</sub> ≤ *m* - 1; -  If *t* = 2: 2 ≤ *r*<sub class="lower-index">1</sub> ≤ *r*<sub class="lower-index">2</sub> ≤ *n* - 1, 2 ≤ *c*<sub class="lower-index">1</sub> ≤ *c*<sub class="lower-index">2</sub> ≤ *m* - 1, the specified group of barriers exist on the ground before the removal. -  If *t* = 3: no extra restrictions.
For the first example, the situations of Koyomi's actions are illustrated below.
5 6 5
1 2 2 4 5
1 3 3 3 3
3 4 4 1 1
2 2 2 4 5
3 1 1 4 4
No
Yes
2500 2500 8
1 549 1279 1263 2189
1 303 795 1888 2432
1 2227 622 2418 1161
3 771 2492 1335 1433
1 2017 2100 2408 2160
3 48 60 798 729
1 347 708 1868 792
3 1940 2080 377 1546
No
Yes
No
3 3 5
3 1 3 1 3
3 1 1 3 1
1 2 2 2 2
3 2 3 2 2
3 1 1 2 2
Yes
Yes
No
No
3 4 5
3 3 4 3 4
1 2 2 2 3
3 2 2 2 3
3 3 3 2 4
3 2 2 1 1
Yes
Yes
Yes
No
5 5 10
1 3 2 4 2
1 4 4 4 4
1 2 4 2 4
3 4 2 4 1
3 2 2 5 3
3 2 2 1 5
3 3 2 5 1
3 4 5 2 3
3 1 5 4 2
3 1 2 5 2
No
Yes
Yes
No
Yes
No
Yes
10 10 10
1 5 7 8 8
3 8 2 6 7
1 5 4 9 4
3 4 2 3 3
1 2 3 3 4
3 5 7 2 9
1 3 6 9 9
2 2 3 3 4
3 1 2 2 2
3 4 9 2 7
No
Yes
No
Yes
No
10 10 10
1 5 4 8 5
3 3 6 5 9
3 3 10 1 1
1 3 5 3 5
1 3 7 8 8
1 2 2 2 3
3 9 7 7 3
1 4 2 8 2
3 9 2 9 3
3 7 4 7 4
Yes
Yes
Yes
Yes
Yes
2450 100 20
1 333 19 414 95
1 1121 15 2270 28
3 539 27 2026 84
1 1286 78 2422 84
1 717 3 1051 65
2 1121 15 2270 28
3 1127 42 42 92
3 1701 70 503 6
1 2008 7 2363 59
3 2183 52 282 43
1 530 7 642 32
3 13 57 2127 1
2 717 3 1051 65
2 2008 7 2363 59
1 1501 10 2213 66
3 596 15 1215 15
1 1016 13 1262 65
1 815 23 841 39
2 530 7 642 32
3 1189 5 794 33
Yes
Yes
Yes
No
Yes
No
Yes
1 1 1
3 1 1 1 1
Yes
print("_RANDOM_GUESS_1689369502.326902")# 1689369502.326922