program Project2;

{$APPTYPE CONSOLE}

type
        trect=record
                a, b: integer;
        end;

function equals(r1, r2: trect): boolean;
begin
        equals:=((r1.a=r2.a) and (r1.b=r2.b)) or ((r1.a=r2.b) and (r1.b=r2.a));
end;

function issquare(r: trect): boolean;
begin
        issquare:=(r.a=r.b);
end;

var
        fileIn, fileOut: text;
        r, p: array[1..6] of trect;
        nofsquares, sq, i, j, counter, nofdif: integer;
        u: array[1..6] of boolean;
        w: array[1..6] of integer;
        temp: trect;

begin
  assign(fileIn, 'box.in');
  assign(fileOut, 'box.out');
  reset(fileIn);
  rewrite(fileOut);

  for i:=1 to 6 do
  begin
        readln(fileIn, r[i].a, r[i].b);
  end;
  counter:=0;
  for i:=1 to 6 do
        u[i]:=false;
  for i:=1 to 6 do
        if (not(u[i])) then begin
                u[i]:=true;
                for j:=(i+1) to 6 do
                begin
                        if (not(u[j]) and (equals(r[i], r[j]))) then begin
                                inc(counter);
                                u[j]:=true;
                                p[counter]:=r[i];
                                break;
                        end;
                end;
        end;
  if (counter<>3) then
        write(fileOut, 'IMPOSSIBLE')
  else begin
        nofsquares:=0;
        nofdif:=0;
        w[1]:=p[1].a;
        w[2]:=p[1].b;
        w[3]:=p[2].a;
        w[4]:=p[2].b;
        w[5]:=p[3].a;
        w[6]:=p[3].b;
{        for i:=1 to 6 do
        begin
                o:=true;
                for j:=(i-1) downto 1 do
                        if (w[j]=w[i]) then begin
                                o:=false;
                                break;
                        end;
                if o then inc(nofdif);
        end;
}
        sq:=1;
        for i:=1 to 3 do
                if (issquare(p[i])) then begin
                        inc(nofsquares);
                        sq:=i;
                end;
        temp:=p[1];
        p[1]:=p[sq];
        p[sq]:=temp;
        for i:=1 to 6 do
                u[i]:=false;
        case nofsquares of
                0: begin
                        for i:=1 to 6 do
                        begin
                                if not(u[i]) then begin
                                        u[i]:=true;
                                        for j:=(i+1) to 6 do
                                        begin
                                                if ((not(u[j]) and (w[i]=w[j]))) then begin
                                                        u[j]:=true;
                                                        inc(nofdif);
                                                        break;
                                                end;
                                        end;
                                end;
                        end;
                        if (nofdif=3) then
                                write(fileOut, 'POSSIBLE')
                        else
                                write(fileOut, 'IMPOSSIBLE');
                end;
                1: begin
                        if (((p[1].a=p[2].a) or (p[1].a=p[2].b)) and ((p[1].a=p[3].a) or (p[1].a=p[3].b))) then
                                write(fileOut, 'POSSIBLE')
                        else
                                write(fileOut, 'IMPOSSIBLE');
                end;
                2: begin
                        write(fileOut, 'IMPOSSIBLE');
                end;
                3: begin
                        if ((p[1].a=p[2].a) and (p[1].a=p[3].a)) then
                                write(fileOut, 'POSSIBLE')
                        else
                                write(fileOut, 'IMPOSSIBLE');
                end;
        end;
  end;

  close(fileIn);
  close(fileOut);
end.
