Under construction

Still being built. Things may change

Questions Keep Coming

Interview

Time limit1sMemory limit1024 MB

Summary
Each question asks whether all earlier answers in a range x to y were Yes or all were No, and the task is to output the true answer to every question.
Level

Easy3 of 10

Topics
Array, Prefix sum
Solved
No attempts yet

Problem

Ningning likes questions that can be answered with yes or no. The answer to Ningning's first question was "Yes".

From the second question on, Ningning keeps asking questions of the following forms:

  • 1 x y: Were the answers to all questions from the xx-th to the yy-th all "Yes"?
  • 2 x y: Were the answers to all questions from the xx-th to the yy-th all "No"?

When Ningning asks one of these questions, you have already answered questions xx through yy. Write a program that answers every question Ningning asks.

Input

The first line contains NN, the number of questions after the first one. In other words, Ningning asks N+1N+1 questions in total.

Each of the next NN lines contains one question in the form 1 x y or 2 x y.

Output

Print NN lines, the answers to Ningning's questions in order. Print Yes if the answer is "Yes" and No if the answer is "No".

Limits

All given numbers are integers.

  • 1≤N≤200 0001 \le N \le 200\,000
  • For the ii-th question (2≤i≤N+12 \le i \le N+1), 1≤x≤y<i1 \le x \le y < i.

Examples1

  1. Example 1

    Input
    6
    1 1 1
    2 1 2
    2 2 3
    1 1 2
    2 3 4
    1 5 5
    
    Expected output
    Yes
    No
    No
    Yes
    Yes
    Yes