 var f:textfile;
     a:array[1..6,1..2] of integer;
     i:integer;

function Check:boolean;
 var i,u, chis:integer;
     box:array[1..6,1..2]of integer;
begin
 Check:=false;
 chis:=0;
 for i:=1 to 5 do begin
  if a[i,1]=0 then continue;
  for u:=i+1 to 6 do begin
   if a[u,1]=0 then continue;
   if(a[i,1]=a[u,1])and(a[i,2]=a[u,2]) then begin
    inc(chis);
    box[chis,1]:=a[i,1];
    box[chis,2]:=a[i,2];
    a[u,1]:=0; a[u,2]:=0;
    break;
   end;
   if(a[i,2]=a[u,1])and(a[i,1]=a[u,2]) then begin
    inc(chis);
    box[chis,2]:=a[i,1]; box[chis,1]:=a[i,2];
    a[u,1]:=0; a[u,2]:=0;
    break;
   end;
  end;
 end;
 if chis<>3 then exit;
 Check:=true;
 if(box[2,1]=box[3,1])then
  if(box[1,2]=box[2,2])and(box[1,1]=box[3,2])or
    (box[1,2]=box[3,2])and(box[1,1]=box[2,2])then exit;

 if(box[2,2]=box[3,2])then
  if(box[1,2]=box[2,1])and(box[1,1]=box[3,1])or
    (box[1,2]=box[3,1])and(box[1,1]=box[2,1])then exit;

 if(box[2,1]=box[3,2])then
  if(box[1,2]=box[2,2])and(box[1,1]=box[3,1])or
    (box[1,2]=box[3,1])and(box[1,1]=box[2,2])then exit;

 if(box[2,2]=box[3,1])then
  if(box[1,2]=box[2,1])and(box[1,1]=box[3,2])or
    (box[1,2]=box[3,2])and(box[1,1]=box[2,1])then exit;
 Check:=false;
end;

begin
 AssignFile(f,'box.in');
 reset(f);
 for i:=1 to 6 do
  readln(f,a[i,1], a[i,2]);
 CloseFile(f);

 AssignFile(f,'box.out');
 rewrite(f);
 if Check then writeln(f,'POSSIBLE')
 else writeln(f,'IMPOSSIBLE');
 closefile(f);
end.
