Connect the Points
면접 대비시간 제한3초메모리 제한512 MB
세 점을 축에 평행한 선분으로 최소 총 길이로 연결하고, 그 선분들을 출력합니다.
문제
You are given three points on a plane. You should choose some segments on the plane that are parallel to coordinate axes, so that all three points become connected. The total length of the chosen segments should be the minimal possible.
Two points and are considered connected if there is a sequence of points such that points and lie on the same segment.
입력
The input consists of three lines describing three points. Each line contains two integers and separated by a space --- the coordinates of the point (). The points are pairwise distinct.
출력
On the first line output --- the number of segments, at most 100.
The next lines should contain descriptions of segments. Output four integers , , , on a line --- the coordinates of the endpoints of the corresponding segment (). Each segment should be either horizontal or vertical.
It is guaranteed that the solution with the given constraints exists.
힌트
The points and the segments from the example are shown below.
