"I'm a diligent, honest and law-abiding citizen of Chang'an City, surnamed Li mingyuanfang. But in the invisible corner,he was coerced by the terrible man to engage in the business of inquiry. "
"If my answer doesn't satisfy him, the reward There will be a good play. "
"As you can see, our Yuan Fang is the descendant of the devil. This pair of big ears is proof that they can't be wiped out. All the people in the world fight against the demons. Only Chang'an City has taken in my brothers and sisters who have lost their parents. It accepts tourists and products from all sides of the mainland, and is used to being mixed with demons. Chang'an allows me to support myself safely: cross the street, sweep the dining hall, deliver express delivery, dig the ditch. Living in Chang'an City, feeling its vitality, as a part of it, can always give people endless hope. "
"What's good for big ears is that all kinds of talks will come to us: like the first dancer in the mainland, mink Chan, and her sweetheart, Master Liu Chan, who recently cheated on his father, sword immortal and sword saint in the future century war Ah, how can there be so many shameful secrets in the world! ""But... There are always secrets you can't spy on. If you know it, you may die. "
"The moon is bright in the spring night. When I hang upside down on the gingko tree of the temple, brain mending tomorrow's recipe, the old man, the ancient devil guide, steps into the temple. ""The legend in the elder's mouth is vividly presented in front of us: the old man roars and calls the arrogant woman opposite as the unworthy disciple and the devil's kindred. He swore that even if he destroyed Chang'an, he would never let Chang'an's miracle fall into the hands of the devil species. "
"I was shaking. The old man, the old man with great power, will take away my only shelter, and he will take away Chang'an."
"Anger, anger makes me forget strength. In front of the old man's overwhelming power, the woman and her assistant are at a clear disadvantage. The old man's back was completely exposed to my eyes. I threw out my body protecting Throwing Knife without thinking
"The throwing knife could not even touch the old man, but it was enough to draw him back. At one glance, I felt the suffocation in my throat. But he didn't kill me. A moment of stagnation is enough to decide the battle. The incantation of the woman is finished, and the brilliant light will drag the old man into the instantaneous day. Maybe it's not just the power of women, maybe it's the city of Chang'an that gets angry. "
"The dust settled. The woman left first, but the assistant with the token looked up at my hiding place coldly under the ginkgo tree. I see things that I shouldn't see, will they be silenced? "
"Suddenly, I think this guy is really familiar. I once saw his silent carved figure under a certain beam. "
Now, Li Yuanfang has to deal with one thing. There are n (n < = 2e5) cities. Now we will build many provinces to make many cities under one province. Now let Li Yuanfang judge whether they are under one province for cities a and b.
In the existing q(q<=5e5) operations, 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.

8 3 C 2 5 A 2 5 C 2 5
NO YES