program divide_by_halves;

function sq(x1, y1, x2, y2, x3, y3: integer): integer;
begin
    sq := abs((x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1));
end;

function inside(x1, y1, x2, y2, x3, y3, x, y: integer): boolean;
var
    s1, s2, s3: integer;
begin
    s1 := (x - x1) * (y2 - y1) - (y - y1) * (x2 - x1);
    s2 := (x - x2) * (y3 - y2) - (y - y2) * (x3 - x2);
    s3 := (x - x3) * (y1 - y3) - (y - y3) * (x1 - x3);
    inside := false;
    if  (s1 = 0) and (s2 = 0) or
        (s2 = 0) and (s3 = 0) or
        (s3 = 0) and (s1 = 0) then exit;

    inside := 
        ((s1 >= 0) and (s2 >= 0) and (s3 >= 0)) or
        ((s1 <= 0) and (s2 <= 0) and (s3 <= 0));
end;

procedure divide(x1, y1, x2, y2, x3, y3: integer);
var
    i, j: integer;
    tsq: integer;
begin
    tsq := sq(x1, y1, x2, y2, x3, y3);
    if tsq = 0 then
        exit;

    if tsq = 1 then
    begin
        writeln(x1, ' ', y1, ' ', x2, ' ', y2, ' ', x3, ' ', y3);
        exit;
    end;

    for i := 0 to 10 do
        for j := 0 to 10 do
        begin
            if inside(x1, y1, x2, y2, x3, y3, i, j) then
            begin
                divide(x1, y1, x2, y2, i, j);
                divide(x2, y2, x3, y3, i, j);
                divide(x3, y3, x1, y1, i, j);
                exit;
            end;
        end;
end;

const
    maxn = 10;

var
    i, n: integer;
    x, y: array [1..maxn] of integer;

begin
{    assign(input, 'half.in');
    reset(input);
    assign(output, 'half.out');
    rewrite(output);}

    read(n);
    for i := 1 to n do
    begin
        read(x[i], y[i]);
    end;

    for i := 2 to n - 1 do
    begin
        divide(x[1], y[1], x[i], y[i], x[i + 1], y[i + 1]);
    end;

    close(input);
    close(output);
end.
