시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 64 MB32266.667%

문제

Carpenter Bill has a huge wooden block. The block has a shape of rectangular parallelepiped. 

The block is so huge that it cannot pass through the door of Bill's house. So he decided to cut it into $n$ smaller blocks. Bill is not a very smart guy so he wants to make all small blocks rectangular, and all of them should be equal.

Write a program that would help Bill to cut his block.

입력

Let us introduce a coordinate system such that the edges of the block are parallel to the coordinate axes and one of the block's corners is placed at the origin. The opposite corner of the block has coordinates $(x, y, z)$.

The first line of the input file contains four integer numbers --- $x$, $y$, $z$ and $n$ ($1 \le x, y, z, n \le 1\,000$).

출력

Output file should contain $n$ lines each describing one small block. Each small block is described by six numbers: $x_1$, $y_1$, $z_1$, $x_2$, $y_2$, $z_2$, where $(x_1, y_1, z_1)$ are the coordinates of one corner of the block and $(x_2, y_2, z_2)$ are the coordinates of its opposite corner.

Coordinates must be precise up to eight digits after the decimal point.

예제 입력 1

3 2 2 4

예제 출력 1

0 0 0 1.5 1 2
3 0 0 1.5 1 2
0 1 0 1.5 2 2
3 1 0 1.5 2 2

예제 입력 2

3 2 2 6

예제 출력 2

0 0 0 1 2 1
0 0 1 1 2 2
1 0 0 3 1 1
1 0 1 3 1 2
1 1 0 3 2 1
1 1 1 3 2 2

힌트

출처

ICPC > Regionals > Northern Eurasia > North-Western Russia Regional Contest > NEERC Northern Subregional 2005 C번

  • 문제의 오타를 찾은 사람: doju