{.$define debug}

{$apptype console}

{$ifdef debug}
{$R+,S+,Q+,I+,O-}
{$else}
{$R+,S-,Q+,I-,O+}
{$endif}

{$assertions on}
{$apptype console}

program template;
uses
 SysUtils;
const
 m = 6;
 {$ifdef debug}
 cinfile = 'input.txt';
 coutfile = 'output.txt';
 {$else}
 cinfile = 'box.in';
 coutfile = 'box.out';
 {$endif}
type
 int = longint;
 real = extended;
 tpoint = record
  a,b :int;
 end; 
var
 n :int;
 r :array [1..m] of tpoint;
 ans :boolean;

procedure init;
begin
 fillchar (n,integer(@ans) - integer(@n),0);
 ans := true;
end;

procedure swapInt (var a,b :int);
begin
 a := a xor b;
 b := a xor b;
 a := a xor b;
end;

procedure readdata;
var i,j :int;
begin
 assign (input,cinfile);
 reset (input);
 for i := 1 to m do
  begin
   read (r[i].a,r[i].b);
   if r[i].a > r[i].b then
    swapint(r[i].a,r[i].b);
  end;
 close (input);
end;

procedure outdata;
var i,j :int;
begin
 assign (output,coutfile);
 rewrite (output);
 if ans then
  writeln ('POSSIBLE')
 else
  writeln ('IMPOSSIBLE');
 close (output);
end;

function less (const a,b :tpoint):boolean;
begin
 if (a.a = b.a) then
  result := a.b < b.b
 else
  result := a.a < b.a;
end;

procedure swap (var a,b :tpoint);
var tmp :tpoint;
begin
 tmp := a;
 a := b;
 b := tmp;
end;


procedure solve;
var i,j :int;
begin
 for i := 1 to m-1 do
  for j := i+1 to m do
   if less (r[j],r[i]) then
    swap (r[i],r[j]);
 if not (r[1].a = r[2].a) or not (r[1].b = r[2].b) then
  ans := false;
 if not (r[2].a = r[3].a) or not (r[3].a = r[4].a) then
  ans := false;
 if not (r[3].b = r[4].b) or not (r[3].b = r[5].b) or not (r[3].b = r[6].b) then
  ans := false;
 if not (r[1].b = r[5].a) or not (r[1].b = r[6].a) then
  ans := false;
end;

begin
 init;
 readdata;
 solve;
 outdata;
end.
