CSES - Forbidden Cities
  • Time limit: 1.00 s
  • Memory limit: 512 MB

There are nn cities and mm roads between them. Kaaleppi is currently in city aa and wants to travel to city bb.

However, there is a problem: Kaaleppi has recently robbed a bank in city cc and can't enter the city, because the local police would catch him. Your task is to find out if there is a route from city aa to city bb that does not visit city cc.

As an additional challenge, you have to process qq queries where aa, bb and cc vary.

Input

The first input line has three integers nn, mm and qq: the number of cities, roads and queries. The cities are numbered 1,2,,n1,2,\dots,n.

Then, there are mm lines describing the roads. Each line has two integers aa and bb: there is a road between cities aa and bb. Each road is bidirectional.

Finally, there are qq lines describing the queries. Each line has three integers aa, bb and cc: is there a route from city aa to city bb that does not visit city cc?

You can assume that there is a route between any two cities.

Output

For each query, print "YES", if there is such a route, and "NO" otherwise.

Constraints

  • 1n1051 \le n \le 10^5
  • 1m21051 \le m \le 2 \cdot 10^5
  • 1q1051 \le q \le 10^5
  • 1a,b,cn1 \le a,b,c \le n

Example

Input:

5 6 3
1 2
1 3
2 3
2 4
3 4
4 5
1 4 2
3 5 4
3 5 2

Output:

YES
NO
YES