program Project1;

{$APPTYPE CONSOLE}

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

  var
    a,k:integer;
    side:array [1..6,1..2] of integer;
    side2:array [1..6,1..2] of integer;
    sides:integer;
    ifis:boolean;
    ml:array [1..6] of byte;

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

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

  sides:=0;

  for a:=1 to 6 do begin
    ifis:=true;
    for k:=1 to sides do
     if ((side2[k,1]=side[a,1]) and (side2[k,2]=side[a,2])) or ((side2[k,1]=side[a,2]) and (side2[k,2]=side[a,1])) then ifis:=false;
    if ifis then begin
     inc(sides);
     side2[sides,1]:=side[a,1];
     side2[sides,2]:=side[a,2];
    end; 
  end;

  if sides=1 then ifis:=true;

  if sides=2 then
  ifis:=
  ((side2[1,1]=side2[1,2]) or (side2[2,1]=side2[2,2]))
   and ((side2[1,1]=side2[2,1]) or (side2[1,1]=side2[2,2]) or (side2[1,2]=side2[2,1]) or (side2[1,2]=side2[2,2]));

  if sides=3 then
  ifis:=
  ((side2[1,1]=side2[2,1]) or (side2[1,1]=side2[2,2]) or (side2[1,1]=side2[3,1]) or (side2[1,1]=side2[3,2]))
   and ((side2[1,2]=side2[2,1]) or (side2[1,2]=side2[2,2]) or (side2[1,2]=side2[3,1]) or (side2[1,2]=side2[3,2]))
   and ((side2[2,1]=side2[3,1]) or (side2[2,1]=side2[3,2]) or (side2[2,2]=side2[3,1]) or (side2[2,2]=side2[3,2]));

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

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