프로그램 명: coci_rez(special judge)
제한시간: 1 초

//스페졀 저지가 아직 ...

블루베리,스트로우 베리와 초콜릿으로 만든 큰 케이크가 있다.

It's shaped like a square, and has area of 100 square meters. 이 케이크는 정사각형 모양이고 넓이가 100 제곱 미터이다. Proffesionals strongly advise that cake is being cut with wet knife and eaten with dry spoon. Also: 이 케이크는 젖은 칼로 자르고 마른 숟가락으로 먹기를 권하고 있고 , 또한 ,

Parts obtained by these cuts are separated and counted only after last cut has been made. 이 자름으로 얻어지는 조각은 떨어져있고 마지막 자름이 있은 후 에만 셀 수가 있다. During cutting, the cake keeps its square form. 자름 동안 케이크는 정사각형을 유지한다.

At least how many cuts need to be made in order to obtain at least K parts? Exactly what cuts to make? k 조각을 얻기 위해 적어도 얼마나 많이 잘라야 할까? 정확히


Let's say that there exists a huge cake made from blueberries, strawberries and chocolate. It's shaped like a square, and has area of 100 square meters. Proffesionals strongly advise that cake is being cut with wet knife and eaten with dry spoon. Also: Parts obtained by these cuts are separated and counted only after last cut has been made. During cutting, the cake keeps its square form.

At least how many cuts need to be made in order to obtain at least K parts? Exactly what cuts to make?

입력

The first and only line of input contains an integer K (1 ≤ K ≤ 1 000 000), minimum number of parts that we must have after cutting is done.

출력

The first line of output should contain the requested number of cuts, N.

The following N lines should have four integers each, coordinates of starting and ending point for each cut made. Coordinates are represented in millimeters, and opposing corners of the cake have coordinates (-5000, -5000) and (5000, 5000). So for each point (x, y) lying on the side of the square, the following will hold:

max( |x|, |y| ) = 5000.

입출력 예

input

1 

output 

0 

input 

4 

output 

2 
-5000 -5000 5000 5000 
5000 -5000 -5000 5000 

input 

7 

output 

3 
-5000 5000 0 -5000 
-2000 -5000 5000 5000 
-5000 0 5000 0
출처:coci 2012 4/6

[질/답] [제출 현황] [푼 후(0)]
[홈으로]  [뒤 로]