You are a flooring contractor with bickering employees. You must get them to work together to wax the floors of several rooms, each of which has exactly one door.
No worker wants to do more than any other, and they insist on working side by side so each can check that nobody is slacking off. You must therefore split every room into pieces of equal area, one per worker. Each worker gets a single connected piece. The pieces are separated by straight line segments that radiate from the doorway out to a wall, so everyone can walk out of the room along a boundary once the job is done.
The input is a sequence of room definitions, each of the form:
WIDTH HEIGHT DOOR WORKERS
Every value is a non-negative integer at most 100, with WORKERS at least 2 and WIDTH and HEIGHT positive. They give the four corners of the room, (0,0), (WIDTH,0), (WIDTH,HEIGHT), and (0,HEIGHT), and the position of the door, (DOOR,0) with 0 < DOOR < WIDTH. Each room definition appears on its own line.
The end of the input is marked by a line of four zeros:
0 0 0 0
For each room, print the coordinates, to exactly 3 decimal places, of the endpoints of the WORKERS−1 segments that run from the door to a wall and split the room into WORKERS pieces of equal area. List the endpoints in counterclockwise order, starting with the segment that borders the floor to the right of the door (nearer the corner (WIDTH,0)). Print each room's answer on its own line, giving each endpoint as a space-separated 'x y' pair.