Time limit
1s
Memory limit
128 MB
A geological survey map marks the positions of diamonds buried underground. The map is divided by equally spaced vertical and horizontal grid lines. Each diamond is located at an intersection of a vertical line and a horizontal line. The point A cells from the left edge of the map and B cells from the bottom edge is written as (A, B).
You will excavate exactly one square region. The square must have side length K, and its sides must be parallel to the map boundary. All four vertices of the square must be grid intersections on the map. Diamonds lying on the boundary of the square are also included, and the square must not extend outside the map.
In the illustration below, when K = 3, a square can contain at most 5 diamonds.

Given the map information, find one square that contains as many diamonds as possible.
The first line contains four integers N, M, T, and K. N is the width of the map, and M is the height of the map (1 <= N, M <= 1,000,000). T is the number of diamonds, and K is the side length of the square. Here, 1 <= T <= 100, 1 <= K <= 1,000,000, and K is not greater than N or M.
Each of the next T lines contains two integers A and B, the coordinates of one diamond. A satisfies 0 <= A <= N, and B satisfies 0 <= B <= M. All diamond coordinates in the input are distinct.
On the first line, print two integers X and Y, the coordinates of the upper-left vertex of the chosen square. On the second line, print the number of diamonds contained in that square.
If there is more than one valid answer, print any one of them. The square must not extend outside the map.