Implement disjoint sets union data structure. You have to perform queries of two types:
union u v - unite two sets that contain and respectively;
get u v - check that two elements and belong to the same set.
The first line contains two integers and (1 \leq n, m \leq 5 \cdot 10^5) - the number of elements and the number of queries. Next lines contain queries, one per line.
For a query union the line looks like union u v (1 \leq u, v \leq n).
For a query get the line looks like get u v (1 \leq u, v \leq n).
Print the result of each query get one per line in the respective order: "YES", if the elements belong to the same set, and "NO" otherwise.
Example 1