Gypsy Moths

Time limit1sMemory limit128 MB

Problem

A ranger and a park manager are tracking gypsy-moth infestations in a park. A remote-controlled camera sits atop a nearby mountain, and every infested tree has been plotted as a point on a map.

Because the temperature on the mountain is dropping, the camera will soon freeze in place and can no longer be turned. It also has a narrow field of view, so it can only show trees that fall inside a limited angular range. Before the camera freezes, the ranger wants to aim it in the single direction that shows as many infested trees as possible.

The camera is at a fixed point. Distance does not affect visibility: a tree is visible as long as its direction from the camera falls within the camera's field of view.

Input

The input contains one or more data sets.

Each data set begins with a line containing a single non-negative integer $N$, the number of infested trees. A line containing $0$ marks the end of the input and must not be processed.

For a data set with $N \ge 1$:

  • The next line contains three floating-point numbers: the camera's $X$ and $Y$ coordinates and the camera's field of view $V$ (an angle in degrees).
  • Each of the following $N$ lines contains the $X$ and $Y$ coordinates of one infested tree. No tree shares the camera's coordinates.

All coordinates are floating-point numbers in the range $-500.0$ to $500.0$. The field of view $V$ is a floating-point number in the range $0.1$ to $179.9$ degrees.

Output

For each data set, aim the camera at an angle $A$ that maximizes the number of infested trees lying within the angular range $A \pm V/2$.

  • Angles are measured so that $0.0$ points along the positive $Y$ axis and $90.0$ points along the positive $X$ axis (angles increase clockwise).
  • The camera clicks into place only at whole tenths of a degree, so $A$ must be a multiple of $0.1$. Intermediate angles are not possible.
  • A tree counts as visible only if its direction lies strictly inside the range $A \pm V/2$; a tree exactly on the boundary is not visible.
  • Distance does not affect visibility.
  • If several angles show the same maximal number of trees, choose the smallest such angle.

For each data set, print one line in exactly this form:

Point the camera at angle ### to view ## infested trees.

where ### is the chosen angle $A$, in the range $0.0$ to $359.9$, printed with exactly one digit after the decimal point, and ## is the number of visible trees, printed as an integer.

The test data are chosen so that no tree lies within $0.01$ degree of a boundary, so borderline precision is never an issue.