program bb;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var x,y:array[1..6] of integer;
    xx,yy:array[1..3] of integer;

procedure getData;
var i:integer;
begin
  for i:=1 to 6 do begin
    read(x[i],y[i]);
  end;
end;

procedure solve;
var i,j,k,count:integer;
    ii1,ii2:integer;
    ind1,ind2:integer;
    ch:boolean;
begin
  j:=1; i:=1;
  while i<=3 do begin
    while x[j]=0 do inc(j);
    k:=j+1;
    ch:=true;
    while (k<=6) and ch do begin
      if not(((x[k]=x[j]) and (y[k]=y[j])) or ((x[k]=y[j]) and (y[k]=x[j]))) then inc(k)
      else begin
        x[k]:=0; y[k]:=0; ch:=false;
      end;
    end;
    inc(j);
    if k>6 then begin
      writeln('IMPOSSIBLE');
      i:=4;
    end;
    inc(i);
  end;
  if i=4 then begin
    j:=1;
    while x[j]=0 do inc(j);
    xx[1]:=x[j]; yy[1]:=y[j]; inc(j);
    while x[j]=0 do inc(j);
    xx[2]:=x[j]; yy[2]:=y[j]; inc(j);
    while x[j]=0 do inc(j);
    xx[3]:=x[j]; yy[3]:=y[j];

    //xx[1]
    ch:=true;
    if xx[1]=xx[2] then begin xx[2]:=0; ch:=false; end;
    if ch and (xx[1]=yy[2]) then begin yy[2]:=0; ch:=false; end;
    if ch then begin
      if xx[1]=xx[3] then begin xx[3]:=0; ch:=false; end;
      if ch and (xx[1]=yy[3]) then begin yy[3]:=0; end;
    end;
    //xx[2]
    ch:=true;
    if yy[1]=xx[2] then begin xx[2]:=0; ch:=false; end;
    if ch and (yy[1]=yy[2]) then begin yy[2]:=0; ch:=false; end;
    if ch then begin
      if yy[1]=xx[3] then begin xx[3]:=0; ch:=false; end;
      if ch and (yy[1]=yy[3]) then begin yy[3]:=0 end;
    end;
    count:=0;
    //
    ii1:=0; ii2:=0;
    if xx[2]=0 then begin inc(count); ind1:=yy[2]; ii1:=2; end;
    if yy[2]=0 then begin inc(count);
      if ii1<>0 then begin ind2:=xx[2]; ii2:=2; end
      else begin ind1:=xx[2]; ii1:=2; end
    end;
    if xx[3]=0 then begin inc(count);
      if ii1<>0 then begin ind2:=yy[3]; ii2:=3; end
      else begin ind1:=yy[3]; ii1:=3; end
    end;
    if yy[3]=0 then begin inc(count);
      if ii1<>0 then begin ind2:=xx[3]; ii2:=3; end
      else begin ind1:=xx[3]; ii1:=3; end
    end;
//    for i:=2 to 3 do begin
//      if xx[i]=0 then begin inc(count); ind1:=yy[i]; ii1:=i; end;
//      if yy[i]=0 then begin inc(count); ind2:=xx[i]; ii2:=i; end;
//    end;
    if (count=2) then begin
      if ii1<>ii2 then begin
        if (ind1=ind2) then writeln('POSSIBLE')
        else writeln('IMPOSSIBLE')
      end
      else begin
        if (xx[5-ii1]=yy[5-ii1]) and ((xx[5-ii1]=xx[1]) or (xx[5-ii1]=yy[1]))
        then writeln('POSSIBLE')
        else writeln('IMPOSSIBLE')
      end;
    end
    else begin
      writeln('IMPOSSIBLE');
    end
  end;
end;

begin
  assign(input,'box.in'); reset(input);
  assign(output,'box.out'); rewrite(output);
  getData;
  solve;
  close(input); close(output);
end.
