Cricket field
Once upon a time, there was a greedy King who commanded his chief Architect to construct a cricket field in the royal park. The King, driven by greed, dismissed the Architect's suggestion to place the field centrally and encircle it with a scenic border of newly planted trees. Instead, he insisted that no trees be cut down or newly planted, and that the largest possible cricket field be built. Should the Architect alter even a single tree or design a field smaller than the maximum possible size, he would face execution. Additionally, the Architect was required to provide a detailed plan of the field, specifying its exact location and dimensions.
Your task is to assist the Architect in preserving his life by developing a program that determines the maximum size and position of the cricket field that adheres to the King's strict requirements.
The problem is simplified by the fact that the King's park is rectangular and situated on a flat surface, with its boundaries aligned parallel to the north-south and east-west directions. The royal game of cricket is always played on a square field, whose boundaries are also parallel to these directions. The Architect has already aligned the park with a rectangular Cartesian coordinate system and accurately mapped the coordinates of each tree. The axes of this system are, naturally, parallel to the north-south and east-west directions. The southwest corner of the park is at coordinates (0, 0), and the northeast corner is at (W, H), where W and H represent the park's length and width, respectively.
For this task, you can disregard the diameter of the trees. Trees cannot be located within the cricket field but may be positioned along its edges. The cricket field can touch the park's boundary but must remain entirely within it.
Input
The first line contains three integers, N, W, and H, separated by spaces: N is the number of trees in the park (1 ≤ N ≤ 100), and W and H are the park's length and width, respectively (1 ≤ W, H ≤ 10000).
The following N lines provide the coordinates of the trees in the park. Each line contains two integers x_i and y_i, separated by a space, representing the coordinates of the i-th tree (0 ≤ x_i ≤ W, 0 ≤ y_i ≤ H). All trees have unique coordinates.
Output
Output three integers, P, Q, and L, where (P, Q) are the coordinates of the southwest corner of the cricket field, and L is the length of its sides. If there are multiple possible positions for the maximum-sized field, you may output any one of them.