The input for this program consists of one or more observation sets.
Each observation set is constructed as follows:
- The first line contains 4 integers
< W > < L > < N > < T >
W and L are positive integers representing the width (x dimension) and length (y dimension) of the yard. N is the non-negative number of terriers. T is the positive number of time intervals over which we have conducted observations.
- The remainder of the observation set contains one line per terrier. Each line contains 2T integers denoting the (x,y) coordinates of the terrier at each of the T time steps, expressed separated by whitespace without parentheses or commas. Possible coordinates range from (0, 0) in one corner of the yard to (W, L) at the opposite corner.
The end of input is signaled by a line containing 4 zeros in place of a valid (W, L,N, T) set.