DSU#8798

DSU

1 second
64 megabytes
Easy

In Uzhlandia, there are cities, numbered from to . Initially, there are no roads between the cities, but roads will be built over time.

Tourist Vasyl asks you to answer queries of two types:

  1. — Construct a bidirectional road between cities and .

  2. — Determine whether it is possible to travel from city to city using the existing roads. Output YES if it is possible, otherwise output NO.

\InputFileThe first line contains the integers and (1 \leq n, q \leq 2 \times 10^5).

The following lines each contain a query as described above.

\OutputFileFor each query of type , output the answer on a separate line.

Examples

Example 1

Loading
Loading