program box;
{$APPTYPE CONSOLE}
var
  f:text;
  a,d:array[1..6,1..2] of integer;
  b:array[1..6] of boolean;
  i,j,c:integer;
  pos:boolean;
begin
  //input
  Assign(f,'box.in');
  Reset(f);
  For i:=1 to 6 do
  begin
    Readln(f,a[i,1],a[i,2]);
    b[i]:=true;
  end;
  Close(f);
  //solve
  c:=0;
  For i:=1 to 6 do
    For j:=1 to 6 do
    begin
      If (i<>j)and(b[j])and(b[i])and(((a[i,1]=a[j,1])and(a[i,2]=a[j,2]))or((a[i,1]=a[j,2])and(a[i,2]=a[j,1]))) then
      begin
        b[i]:=false;
        b[j]:=false;
        inc(c);
        d[c,1]:=a[i,1];
        d[c,2]:=a[i,2];
      end;
    end;
  pos:=false;
  If (d[1,1]=d[2,1])and(d[2,2]=d[3,2])and(d[3,1]=d[1,2]) then
    pos:=true;
  If (d[1,1]=d[2,1])and(d[2,2]=d[3,1])and(d[3,2]=d[1,2]) then
    pos:=true;
  If (d[1,2]=d[2,2])and(d[2,1]=d[3,1])and(d[3,2]=d[1,1]) then
    pos:=true;
  If (d[1,2]=d[2,2])and(d[2,1]=d[3,2])and(d[3,1]=d[1,1]) then
    pos:=true;
  If (d[1,2]=d[2,1])and(d[2,2]=d[3,1])and(d[3,2]=d[1,1]) then
    pos:=true;
  If (d[1,2]=d[2,1])and(d[2,2]=d[3,2])and(d[3,1]=d[1,1]) then
    pos:=true;


  //output
  Assign(f,'box.out');
  Rewrite(f);
  If (c=3)and(pos) then
    Write(f,'POSSIBLE')
  else
    Write(f,'IMPOSSIBLE');
  Close(f);
end.
