program b;

{$APPTYPE CONSOLE}

const fname = 'box';
      ifile = fname + '.in';
      ofile = fname + '.out';

var mas: array[0..6,1..2]of longint;

procedure load();
var k: longint;
begin
  for k:=1 to 6 do
    read(mas[k,1],mas[k,2]);
end;

procedure solve();
var k,l: longint;
begin
  for k:=1 to 6 do
    if mas[k,1]>mas[k,2] then begin
      l:=mas[k,1];
      mas[k,1]:=mas[k,2];
      mas[k,2]:=l;
    end;
  for k:=1 to 5 do
    for l:=k+1 to 6 do
      if (mas[k,1]>mas[l,1])or((mas[k,1]=mas[l,1])and(mas[k,2]>mas[l,2])) then begin
        mas[0]:=mas[k];
        mas[k]:=mas[l];
        mas[l]:=mas[0];
      end;
  for k:=1 to 3 do
    if (mas[2*k-1,1]<>mas[2*k,1])or(mas[2*k-1,2]<>mas[2*k,2]) then begin
      writeln('IMPOSSIBLE');
      exit;
    end;
  mas[2]:=mas[3];
  mas[3]:=mas[5];
  if mas[1,1]<>mas[2,1] then begin
    writeln('IMPOSSIBLE');
    exit;
  end;

  if ((mas[1,2]=mas[3,1])and(mas[2,2]=mas[3,2]))or
     ((mas[1,2]=mas[3,2])and(mas[2,2]=mas[3,1])) then
    writeln('POSSIBLE')
  else
    writeln('IMPOSSIBLE');
end;

procedure save();
begin

end;

begin
  assign(input,ifile);
  reset(input);
  assign(output,ofile);
  rewrite(output);
  load;
  solve;
  save;
end.
