program B;

{$APPTYPE CONSOLE}
uses
  SysUtils;

var w,h,a:array[1..6] of longint;
    ii, k, jj, i,j:integer;
    f, ok:boolean;

procedure REadFile;
var i:integer;
begin
 for i:=1 to 6 do
  begin
   readln(w[i],h[i]);
   a[i]:=0;
  end;

end;
procedure GetAns;
var
    t:boolean;
begin
  k := 0;
  for i:=1 to 6 do
   begin
    K :=k +1;
    if a[i]=0 then
    begin
     t:=true;
     a[i]:=k;
     for j:=1 to 6 do
     begin
      if (a[j]=0)and(((w[i]=w[j])and(h[i]=h[j]))or((w[i]=h[j])and(h[i]=w[j]))) then
       begin
        a[j]:= k;
        t:=false;
        break;
       end;
     end;
     if t then
      begin
       f:=false;
       break;
      end;
    end;
   end;
end;

procedure WriteAns;
begin
  for i := 2 to 6 do
  begin
    if a[i] = a[1] then
    begin
      j := i;
      break;
    end;
  end;
  k := 2;
  if a[k] = a[1] then
    k := k + 1;
  for i := 1 to 6 do
  if (a[i] = a[k]) and (i <> k) then
  begin
    jj := i;
    break;
  end;

  for i := 1 to 6 do
  if (a[i] <> a[1]) and (a[i] <> a[k]) then
  begin
    ii := i;
    break;
  end;
  ok := false;
  if (w[1] = w[k]) then
  begin
    if (h[1] = w[ii]) and (h[k] = h[ii]) or
       (h[1] = h[ii]) and (h[k] = w[ii])
     then
       Ok := true;
  end;
  if (h[1] = h[k]) then
  begin
    if (w[1] = w[ii]) and (w[k] = h[ii]) or
       (w[1] = h[ii]) and (w[k] = w[ii])
     then
       Ok := true;
  end;

  if (h[1] = w[k]) then
  begin
    if (w[1] = w[ii]) and (h[k] = h[ii]) or
       (w[1] = h[ii]) and (h[k] = w[ii])
     then
       Ok := true;
  end;
  if (w[1] = h[k]) then
  begin
    if (h[1] = w[ii]) and (w[k] = h[ii]) or
       (h[1] = h[ii]) and (w[k] = w[ii])
     then
       Ok := true;
  end;



  if (f) and (ok)  then writeln('POSSIBLE')
       else writeln('IMPOSSIBLE');
end;
begin
   AssignFile(Input,'box.in');
   AssignFile(Output,'box.out');
   Reset(Input);
   Rewrite(Output);
   f:=true;
   REadFile;
   GetAns;
   WriteAns;

   Close(Input);
   Close(Output);
end.
