La Paz, the capital city of Bolivia, is famous as a tourist spot and for an aerial cable car called Mi Teleférico. You are now visiting La Paz for sightseeing, and you want to visit as many sightseeing places as possible. In this task, we consider the following simplified situation.
There are $N$ aerial cable car stations in La Paz, numbered from $1$ to $N$ in ascending order of altitude. There are $M$ one-way lines, numbered from $1$ to $M$. There are $P$ aerial cable car companies, numbered from $1$ to $P$. Each line is managed by a single company. Line $i$ ($1 ≤ i ≤ M$) is operated from station $A_i$ to station $B_i$, and is managed by the company $C_i$. Here, the line always runs from the lower altitude station to the higher altitude station. In other words, $A_i < B_i$ holds.
The Bureau of transportation of La Paz issued unlimited ride passes for convenience. Each ride pass contains $2$ integers $l$, $r$, which satisfy $1 ≤ l ≤ r ≤ P$. The pass enables the possessor to ride lines, which are managed by any one of company $l, l + 1, \dots ,r$. In other words, for an integer $i$ which satisfies $1 ≤ i ≤ M$, the pass enables the possessor to ride line $i$ when $l ≤ C_i ≤ r$ holds. It is possible to use a single pass for several lines. Let a ride pass $(l,r)$ denote this ride pass.
Now, $Q$ tourists, numbered from $1$ to $Q$, visit La Paz. Tourist $j$ ($1 ≤ j ≤ Q$) has a ride pass $(L_j, R_j)$ and $X_j$ boliviano cash.
Each tourist’s goal is to ensure that no station cannot be travelled from station $1$, using only lines that can be ridden with the ride pass he or she has. Tourist $j$ ($1 ≤ j ≤ Q$) can exchange his or her ride pass described in the following process to achieve their goal. Here, each tourist can exchange at most once.
Your purpose is to determine, for each tourist, whether or not he or she can achieve his or her goal within the cash he or she has.
Write a program which, given information about stations, lines, and tourists, determines whether or not he or she can achieve his or her goal within the cash he or she has for each tourist.
Read the following data from the standard input.
$N$ $M$ $P$
$A_1$ $B_1$ $C_1$
$A_2$ $B_2$ $C_2$
$\vdots$
$A_M$ $B_M$ $C_M$
$Q$
$L_1$ $R_1$ $X_1$
$L_2$ $R_2$ $X_2$
$\vdots$
$L_Q$ $R_Q$ $X_Q$
Write $Q$ lines to the standard output. On the $j$-th line ($1 ≤ j ≤ Q$), output Yes if tourist $j$ can achieve his or her goal, and No otherwise.