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: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;
   for k:=1 to 6 do
   begin
      for i:=1 to 6 do
      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
            for j:=1 to 6 do
               if (x[j]=c) and (y[j]=b) or
                  (x[j]=c) and (y[j]=b) then
               begin
                  ok:=true;
                  for t:=1 to 6 do
                     if (t<>k) and (t<>i) and (t<>j) and
                        ((x[t]<>x[k]) or (y[t]<>y[k])) and
                        ((x[t]<>x[i]) or (y[t]<>y[i])) and
                        ((x[t]<>x[j]) or (y[t]<>y[j])) then
                     begin
                        ok:=false;
                     end;
                  if ok then begin writeln('POSSIBLE'); exit; end;
               end;
      end;
   end;
   writeln('IMPOSSIBLE');
end.
