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;
    i,j,k:byte;

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:
if (x1[1] = y1[2]) and (x1[2]=x1[3]) and (y1[3]=y1[1]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (x1[1] = y1[2]) and (x1[2]=y1[3]) and (x1[3]=y1[1]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (y1[1] = x1[2]) and (y1[2]=x1[3]) and (x1[1]=y1[3]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (y1[1] = x1[2]) and (y1[2]=y1[3]) and (x1[3]=x1[1]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (x1[1] = x1[2]) and (y1[2]=x1[3]) and (y1[1]=y1[3]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (x1[1] = x1[3]) and (y1[1]=y1[2]) and (x1[2]=y1[3]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;
if (x1[1] = y1[3]) and (x1[2]=x1[3]) and (y1[1]=y1[2]) then
begin
 write(f1,'POSSIBLE');
 goto nnn;
end;


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