输入描述:
The first line outputs two numbers, n (n < = 2e5), which means there are n cities and Q (5e5) with tables with Q operations, followed by Q lines. , A a b stands for putting city a and city b in a province, B a b stands for putting city a to city b (a, a + 1,... b-1, b) in a province. C a b stands for judging city a and city b is in a province.if city a and city b is in a province.
输出描述:
For each question of type 3 print "YES" or "NO" (without the quotes), depending on whether the corresponding people work in the same department.