#D3799. Set: Search

    ID: 3156 Type: Default 2000ms 268MiB

Set: Search

For a set SS of integers, perform a sequence of the following operations. Note that each value in SS must be unique.

  • insert(xx): Insert xx to SS and report the number of elements in SS after the operation.
  • find(xx): Report the number of xx in SS (0 or 1).

Constraints

  • 1q200,0001 \leq q \leq 200,000
  • 0x1,000,000,0000 \leq x \leq 1,000,000,000

Input

The input is given in the following format.

qq query1query_1 query2query_2 : queryqquery_q

Each query queryiquery_i is given by

0 xx

or

1 xx

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

Output

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

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

inputFormat

Input

The input is given in the following format.

qq query1query_1 query2query_2 : queryqquery_q

Each query queryiquery_i is given by

0 xx

or

1 xx

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

outputFormat

Output

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

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

样例

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

2 3 3 4 1 0

</p>