Witch Dance

아직 제출이 없습니다시간 제한5초메모리 제한1024 MB

문제

Each Halloween, the NN witches of Sweden all gather high up in the air with their brooms to perform a magical dance. The dance consists of taking one's broom and rotating clockwise around one of the ends of the broom. Each broom is exactly 1 m1\text{ m} long, and everyone rotates at the same speed. The ii'th witch originally starts rotated r_i radiansr\_i\text{ radians} clockwise. 0 radians means that the broom points to the right, i.e. positive xx-direction. All the witches are located at the same height in the air, at positions (x_i,y_i)(x\_i, y\_i) for 1iN1 \le i \le N.

This dance is very beautiful, but has in recent years been plagued by a certain problem. It turns out that nobody had choreographed the dance properly. This caused some of the witches to crash into each other's brooms. As a result, their brooms would break and they would fall down helplessly, being forced to use their parachutes -- can you imagine a greater embarrassment for a witch?

This year, a coalition of witches are tired of their brooms breaking. They have thus produced a choreography beforehand, consisting of the original locations and rotations of the witches' brooms. Can you check if the dance will cause any brooms to crash into each other?

입력

The first line of input consists of a single integer NN (1N200,0001 \le N \le 200\\,000), the number of witches. The next NN lines contains a description of each broom. Each line consists of the real numbers x_i,y_ix\_i, y\_i (109x_iy_i109-10^{9} \le x\_i \le y\_i 10^{9}), and the real number r_ir\_i (0r_i<2π0 \le r\_i < 2\pi), all with at most 2020 digits after the decimal point. The coordinates are measured in meters, and give you the end of the broom that the broom rotates around.

The input will be such that the answer does not change even if the length of the brooms were 1+106 m1 + 10^{-6}\text{ m} long.

출력

Output ok if no witches will crash into each other, and crash if at least one pair of witches will crash.