program shablon;

{$APPTYPE CONSOLE}

uses
  SysUtils;
label mmm,nnn;
var f:text;
    f1:text;
    x:array[1..6] of integer;
    x1:array[1..3] of integer;
    y:array[1..6] of integer;
    y1:array[1..3] of integer;
    l,i,j,k:byte;
    hhhh,max,min:integer;
begin
assignfile(f,'box.in');
assignfile(f1,'box.out');
reset (f);
rewrite(f1);

for i:= 1 to 6 do begin
 read(f,x[i]);
 readln(f,y[i]);
 end;
k:=1;
for i := 1 to 5 do
if (x[i]<>0) and (y[i]<>0) then
for j := 1 to 6 do begin
 if i < j then begin
   if ((x[i]=x[j])and (y[i]=y[j])) or ((x[i]=y[j])and (y[i]=x[j])) then
      begin
        x1[k]:= x[i];
        y1[k]:=y[i];
        x[i]:=0;
        y[i]:=0;
        k:=k+1;
        if k >3 then goto mmm;
        end;
   end;
end;
mmm:
 max:=x1[1];
 min:=x1[1];
 for i := 2 to 3 do begin
 if max < x1[i] then max := x1[i];
 if max < y1[i] then max := y1[i];
  if min > x1[i] then min := x1[i];
 if min > y1[i] then min := y1[i];
 end;
k:=0;
l:=0;
for i := 1 to 3 do
begin
if (x1[i] = max) or (y1[i]=max) then k:=k+1;
if (x1[i] = min) or (y1[i]=min) then l:=l+1;
end;

if (k=1) or (l=1) then WRITE (f1,'IMPOSSIBLE');
for i := 1 to 3 do begin
   if y1[i] = mAX then
   begin
    hhhh:=x1[i];
    x1[i]:=y1[i];
    y1[i]:=hhhh;
     end;
   if x1[i]=min then
   begin
   hhhh:=x1[i];
    x1[i]:=y1[i];
    y1[i]:=hhhh;
     end;
end; {FOR}

 if k=3 then begin  {begin IF}
  if (y1[1] =y1[2]) and (y1[3]=max) then
  begin
  write(f1,'POSSIBLE');
  goto nnn;
  end;

  if (y1[1]= y1[3]) and ( y1[2]=max) then
  begin
  write(f1,'POSSIBLE');
  goto nnn;
  end;

  if (y1[2]= y1[3]) and ( y1[1]=max) then
  begin
  write(f1,'POSSIBLE');
  goto nnn;
  end;
  write(f1,'IMPOSSIBLE');
  goto nnn;
 end; {IF k=3}
for i :=1 to 2 do
 for j:= i to 3 do 
 if x1[i]<x1[j] then
 begin
   hhhh:=x1[j];
   x1[j]:=x1[i];
    x1[i]:=hhhh;
 end;
if ((y1[1] = x1[3]) and (y1[2]=y1[3])) or ((y1[1]=y1[3]) and (x1[2]=x1[3])) then
begin
  write(f1,'POSSIBLE');
  goto nnn;
  end
else
begin
   write(f1,'IMPOSSIBLE');
   goto nnn;
end;


nnn:
close(f1);
  { TODO -oUser -cConsole Main : Insert code here }
end.
 