There will be multiple test cases. Each case is on a single line containing seven integers:
L W CX CY TX TY N
The first two integers, L and W (2 ≤ L,W ≤ 100), are the dimensions of the table. The next two pairs of integers are the coordinates (X, Y) of the cue and target balls, such that 0 < CX,TX < L, and 0 < CY,TY < W, and (CX,CY) is not the same as (TX,TY). The last integer N, (0 ≤ N ≤ 100), is the number of cushions that must be hit. The test cases will be followed by a line with seven 0's.