Witch Dance
Time limit5sMemory limit1024 MB
Given N unit-length brooms that rotate clockwise at equal speed around fixed endpoints, decide whether any two brooms ever collide.
Problem
Each Halloween, the 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 it clockwise around one of the ends of the broom. Each broom is exactly long, and everyone rotates at the same speed. The -th witch originally starts rotated clockwise. 0 radians means that the broom points to the right, that is, in the positive -direction. All the witches are located at the same height in the air, at positions for .
This dance is very beautiful, but in recent years it has been plagued by a certain problem. Nobody had choreographed the dance properly, so some of the witches crashed into each other's brooms. As a result, their brooms broke and they fell down, forced to use their parachutes. A coalition of witches is tired of their brooms breaking, so they have produced a choreography beforehand, consisting of the original locations and rotations of the witches' brooms. Check whether the dance will cause any brooms to crash into each other.
Input
The first line contains a single integer (), the number of witches. Each of the next lines describes one broom with three real numbers , , and , where , , and . All values have at most digits after the decimal point. The coordinates are measured in meters and give the end of the broom that the broom rotates around.
The input is such that the answer does not change even if the brooms were long.
Output
Output ok if no witches will crash into each other, and crash if at least one pair of witches will crash.