The Lake of the Dragon God is one of the most mythical challenges of the contest. A river must be crossed by jumping from rock to rock, but be careful! Some rocks are fake and sink!
ifnextchar ( ifnextchar (offsettrue(0pt,0pt) offsetfalse ifnextchar [(0pt,0pt)(0pt,0pt) ifnextchar [(0pt,0pt)(0pt,0pt)[l](0pt,0pt)(0pt,0pt)[l][] [r]
There are true rocks, all round, with centre and radius . The maximum distance that a contestant can jump is (measuring it from the border of the rocks). Your task is to compute the minimum number of jumps to go from the first rock to the last one without falling into the water. If it is impossible, state so.
Input consists of several cases. Each case starts with the number of rocks and the jump distance . Follow triples of real numbers , and , describing each rock.
For each case of the input, print in a line the minimum number of
jumps to go from the first of the given rocks to the last one, by making
jumps non larger than
,
or “Xof!” if it is impossible.
The test cases will never contain overlapped rocks, nor any exact jump that could cause an error because of precision issues.
The picture shows the rocks of the sample test cases.
Input
4 3 -6 4 1 -1.5 5.5 0.5 -2.5 2 1.5 3 3 2 4 8.3 -6 4 1 -1.5 5.5 0.5 -2.5 2 1.5 3 3 2 4 1 -6 4 1 -1.5 5.5 0.5 -2.5 2 1.5 3 3 2
Output
2 1 Xof!