p02455 Set: Search_28816
For a set $S$ of integers, perform a sequence of the following operations. Note that each value in $S$ must be unique.

* insert($x$): Insert $x$ to $S$ and report the number of elements in $S$ after the operation.
* find($x$): Report the number of $x$ in $S$ (0 or 1).

Constraints

* $1 \leq q \leq 200,000$
* $0 \leq x \leq 1,000,000,000$

Input

The input is given in the following format.


$q$
$query_1$
$query_2$
:
$query_q$


Each query $query_i$ is given by


0 $x$


or


1 $x$


where the first digits 0 and 1 represent insert and find operations respectively.

Output

For each insert operation, print the number of elements in $S$.
For each find operation, print the number of specified elements in $S$.

Example

Input

7
0 1
0 2
0 3
0 2
0 4
1 3
1 10


Output

1
2
3
3
4
1
0
n = int(input())
s = set()
for _ in range(n):
    a, b = map(int,input().split())
    if a == 0:
        s.add(b)
        print(len(s))
    else:
        if b in s:
            print(1)
        else:
            print(0)

7
0 1
0 2
0 3
0 2
0 4
1 3
1 10 7
0 0
0 2
0 3
0 2
0 4
1 3
1 10 7
0 0
0 2
1 3
0 2
0 4
1 3
1 10 7
0 0
1 2
1 3
0 2
0 4
1 3
1 10 7
0 0
1 2
1 0
0 1
0 4
1 3
1 10 7
0 1
0 2
0 3
0 0
0 4
1 3
1 10 7
0 0
1 2
1 3
0 0
0 4
1 3
1 10 7
0 2
0 2
0 3
0 0
0 4
1 3
1 10 7
0 1
0 2
1 3
0 2
0 2
1 3
1 10 7
0 2
0 2
0 3
0 -1
1 4
1 3
1 10 7
0 2
0 2
0 3
0 0
1 0
1 3
1 10 7
0 0
0 2
0 3
0 0
1 0
1 3
1 10 7
1 0
0 2
0 3
0 0
1 0
1 2
1 10 7
1 0
0 1
0 3
0 0
1 0
1 2
1 10 7
1 0
0 1
0 3
0 0
1 0
0 4
1 10 7
1 0
0 1
0 3
0 0
1 0
0 7
1 0 7
0 2
0 2
0 3
0 2
0 4
1 3
1 10 7
0 0
0 3
0 3
0 2
0 4
1 3
1 10 7
0 0
1 2
1 0
0 1
1 4
1 3
1 10 7
0 1
0 2
1 3
0 2
0 4
1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