program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var n,k,i,j,t:integer;
    a,b,c:integer;
    x,y:array[1..6] of integer;
    ok,okk,oki,okj:boolean;
begin
  Assign(input,'box.in'); reset(input);
  Assign(output,'box.out'); rewrite(output);
   for k:=1 to 6 do
   begin
      read(x[k],y[k]);
      if x[k]>y[k] then
      begin
         t:=x[k]; x[k]:=y[k]; y[k]:=t;
      end;
   end;
   ok:=false;
   for k:=2 to 6 do
      if (x[1]=x[k]) and (y[1]=y[k]) then
      begin
         ok:=true;
         for i:=k to 5 do
         begin
            x[i]:=x[i+1]; y[i]:=y[i+1];
         end;
      end;
   if ok then
   begin
      ok:=false;
      for k:=3 to 5 do
         if (x[2]=x[k]) and (y[2]=y[k]) then
         begin
            ok:=true;
            for i:=k to 4 do
            begin
               x[i]:=x[i+1]; y[i]:=y[i+1];
            end;
         end;
   end;
   if ok and ((x[3]<>x[4]) or (y[3]<>y[4])) then ok:=false;
   if not ok then begin writeln('IMPOSSIBLE'); exit; end;
   for k:=1 to 3 do
   begin
      for i:=1 to 3 do
      if i<>k then
      begin
         ok:=false;
         if x[i]=x[k] then
         begin
            a:=x[k]; b:=y[i]; c:=y[k];
            ok:=true;
         end
         else
         if y[i]=x[k] then
         begin
            a:=x[k]; b:=x[i]; c:=y[k];
            ok:=true;
         end;
         if ok then
         begin
            ok:=false;
            for j:=1 to 3 do
             if (j<>k) and (j<>i) then
               if (x[j]=c) and (y[j]=b) or
                  (x[j]=b) and (y[j]=c) then
               begin
                  ok:=true;
               end;
         end;
         if ok then begin writeln('POSSIBLE'); exit; end;
      end;
   end;
   writeln('IMPOSSIBLE');
end.

{
1345 2584
2584 683
2584 1345
683 1345
683 1345
2584 683

1234 4567
1234 4567
4567 4321
4322 4567
4321 1234
4321 1234
}
