Graph Wars

XORin and XORmin are fighting for the title of Great Wise Man's Succesor. They want to prove their skills in graph theoryby solving the following task:
Given N nodes you have to perform M operations:
1 a b : an undirected edge is added between nodes a and b.
2 a: Delete the ath added edge (1 based indexing)
3 a b : find out whether we can add some edges (possibly none) such that only the nodes a, a+1, ... b-1, b form a connected component.

Help XORin and XORmin answer the Great Wise Man's questions.


On the first line there will be the numbers N and M separated by spaces. The next M lines contain information about the operations.


You have to print several lines. Line i will contain the answer for the ith question. The answer will be "YES" or "NO" without quotes.


1 ≤ N ≤ 100 000
1 ≤ M ≤ 400 000


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

Sponsors Gold