program Project1;

{$APPTYPE CONSOLE}

Const
  cIN  = 'box';
  cOUT = 'box';

  var
    a,i:integer;
    side:array [1..12] of integer;
    ifis:boolean;
//    matr:array [1..6,1..6] of byte;
    ml:array [1..6] of byte;

begin
  AssignFile(Input, cIN + '.in');
  Reset(Input);
  AssignFile(Output, cOUT + '.out');
  Rewrite(Output);
//  fillchar(matr,sizeof(matr),0);
  fillchar(ml,sizeof(ml),0);

  for a:=1 to 6 do begin
   readln(side[a*2-1],side[a*2]);
  end;
  ifis:=true;

  for i:=1 to 6 do
  for a:=1 to 6 do begin
   if not (((side[a*2-1]=side[i*2-1]) and (side[a*2]=side[i*2])) or ((side[a*2-1]=side[i*2]) and (side[a*2]=side[i*2-1]))) then begin
     if ((side[a*2-1]=side[i*2-1]) or (side[a*2-1]=side[i*2]) or (side[a*2]=side[i*2-1]) or (side[a*2]=side[i*2])) and (ml[a]<4) and (ml[i]<4) then begin
      inc(ml[a]);
      inc(ml[i]);
     end;
   end;
  end;

  for a:=1 to 6 do if ml[a]<>4 then ifis:=false;

  if ifis then writeln('POSSIBLE') else writeln('IMPOSSIBLE');

  CloseFile(Input);
  CloseFile(Output);
end.
