The territorial waters as defined by the 1982 United Nations Convention on the Law of the Sea, is the belt of water adjecent to the land area of a coastal nation that is regarded as the sovereign territory of the state (including the airspace over and seabed below). Territorial waters are separated from the land area and internal waters by the baseline (usually the mean low-water mark). The territorial zone of a state extends up to 12 nautical miles (1 nautical mile = 1852 meters) from its baseline, and the state has full jurisdiction and control over its territorial waters.

The contiguous zone is the band of water extending from the outer edge of the territorial waters to up to 24 nautical miles from the baseline, within which a state can exert limited control for the purpose of preventing or punishing "infringement of its customs, fiscal, immigration or sanitary laws and regulations within its territory or territorial waters". However, unlike the territorial waters, there is no standard rule for resolving such conflicts and the states in question must negotiate their own compromise. The exclusive economic zone extends from the outer limit of the contiguous zone to a maximum of 200 nautical miles from the territorial waters baseline. A coastal nation has control of all economic resources within its exclusive economic zone, including fishing, mining, oil exploration, and any pollution of those resources. However, it cannot prohibit passage or loitering above, on, or under the surface of the sea that is in compliance with the laws and regulations adopted by the coastal state in accordance with the provisions of the UN Convention, within that portion of its exclusive economic zone beyond its territorial waters. Any stretch of a sea or an ocean beyond the exclusive economic zone of a country is called the international waters.

maritime zones

Your task is to determine for a given point in the sea, in what zone it is located relative to a given baseline. The following table defines the zones based on the distance of the point to the baseline.

distance to baseline (miles) name of maritime zone
$$[0, 12[$$ territorial waters
$$[12, 24[$$ contiguous zone
$$[24, 200[$$ exclusive economic zone
$$[200, \infty[$$ international waters

In this assignment we consider the baseline to be a straight line. To determine the correct name of the zone, we therefore must be able to compute the distance from a point (in the sea) to a straight line (the baseline).

Distance from a point to a straight line

The shortest distance from a point to a straight line can be computed in the following way.

distance to line segment

Assume that the straight line connects the two points $$(x_1, y_1)$$ and $$(x_2, y_2)$$, and that we look for the shortest distance between this straight line and the point $$(x_3, y_3)$$. The perpendicular line from the point $$(x_3, y_3)$$ intersects the straight line in the point $$(x_n, y_n)$$, which is called the nadir. As a result, the shortest distance is equal to the distance between the points $$(x_3, y_3)$$ and $$(x_n, y_n)$$. The coordinates of the nadir $$(x_n, y_n)$$ can be computed as follows: \[\begin{eqnarray*}u &=& \frac{(x_3 - x_1)(x_2 - x_1) + (y_3 - y_1)(y_2 - y_1)}{(x_2 - x_1)^2 + (y_2 - y_1)^2} \\ x_n &=& x_1 + u(x_2 - x_1) \\ y_n &=& y_1 + u(y_2 - y_1) \end{eqnarray*}\] The Euclidean distance $$d$$ between the nadir $$(x_n, y_n)$$ and the point $$(x_3, y_3)$$ can then be computed as follows: \[ d = \sqrt{(x_n - x_3)^2 + (y_n - y_3)^2} \]

Input

The input contains six numbers $$x_1, y_1, x_2, y_2, x_3, y_3 \in \mathbb{R}$$, each on a separate line. The straight line that connects the points $$(x_1, y_1)$$ and $$(x_2, y_2)$$ represents the baseline of a coastal nation. The point $$(x_3, y_3)$$ represents a point in the sea. All coordinates are expressed in nautical miles.

Output

Three lines of output need to be generated, that respectively contain the coordinates of the nadir, the shortest distance from the given point in the sea to the given baseline (in nautical miles), and the zone in which the point in the sea is located (relative to the baseline). The name of the maritime zone must be determined using the table given in the introduction. Have a look at the examples below to see how the output must be formatted.

Example

Input:

100.0
100.0
200.0
200.0
285.0
19.0

Output:

nadir: (152.0, 152.0)
distance: 188.09040379562165 nautical miles
zone: exclusive economic zone

Example

Input:

100.0
100.0
200.0
200.0
140.0
150.0

Output:

nadir: (145.0, 145.0)
distance: 7.0710678118654755 nautical miles
zone: territorial waters