## DYNACON1 - Dynamic Tree Connectivity

A forest of unrooted trees initially consists of N (1 ≤ N ≤ 100,000) single-vertex trees. The vertices are numbered from 1 to N.

All edges in the problem are undirected.

You will receive the following queries, where (1 ≤ A, B ≤ N) :

• add A B : add an edge between vertices A and B, where initially there is no path between A and B.
• rem A B : remove edge between vertices A and B, where initially there is an edge between A and B.
• conn A B : print YES if there is a path between A and B and NO otherwise, where A and B are different.

### Input

The first line of input contains the number of initial single-vertex trees N and the number of queries M (1 ≤ M ≤ 100,000). The following M lines contain queries.

### Output

For each conn query output YES or NO. Pay attention to letter case.

### Example

`Input:5 11conn 1 5add 1 2add 1 3add 3 4add 5 4conn 1 5rem 4 5conn 1 5rem 3 4add 3 5conn 1 5Output:NOYESNOYESThis example will be the first test case.`