#Lutece1311. Excited Table

Excited Table

Migrated from Lutece 1311 Excited Table

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

There is a table with nn legs. Because of the foolishness of the designer, the table may be unstable.

A leg can be describe as three integers x,y,lx,y,l, while (x,y)(x,y) is its position on the tabletop and the leg is perpendicular to the tabletop with length ll.

We define a direction of the table is stable if and only if it exists that three or more legs touch the floor and they are not on one plane, and the table can't be upside down.

A table is stable if and only if it has exactly one stable direction.

Because the tabletop is compact enough, the collision between the tabletop and the floor can be neglected.

In addition, the thickness of legs also should be neglected.

You should determine whether the table is stable.

Input

The first line contains one integer nn.

Then nn lines follow, each with three integers x,y,lx,y,l.

It is guaranteed that no two legs is on the same position.

1n21051\leq n\leq 2*10^5

0x,y1050\leq |x|, |y|\leq 10^5

1l1051\leq l\leq 10^5

Output

If the table is stable, print STABLE; otherwise, print UNSTABLE.

Samples

4
1 1 1
-1 -1 1
-1 1 1
1 -1 1
STABLE
4
1 1 2
-1 -1 1
-1 1 1
1 -1 1
UNSTABLE

Note

title

A stable direction of the table in sample 2.

Resources

The 14th UESTC Programming Contest Final