Circus Show#590

Circus Show

2 seconds
64 megabytes
Easy

A grand theatrical show featuring lions and tigers is planned at the circus. To reduce the aggression between these predators, the trainers want to organize the program so that lions and tigers never appear on stage at the same time.

The show consists of individual performances. Each performance can feature either lions, tigers, or neither. Performance starts s_i minutes after the beginning of the show and lasts t_i minutes. Sometimes, several performances may occur simultaneously on stage (but in such cases, different types of predators cannot be involved at the same time).

The audience enjoys both lion and tiger performances. The trainers ask you to help them assign each performance to either lions or tigers so that the minimum of the number of lion performances and the number of tiger performances is as large as possible.

Input

The first line contains (1 \leq n \leq 200). Each of the next lines contains two integers s_i and t_i (0 \leq s_i \leq 10^9, 1 \leq t_i \leq 10^9).

Output

Print numbers. The -th number should be if the -th performance features lions, if it features tigers, or if it features neither.

Examples

Example 1

Loading
Loading