program Project2;

uses
  SysUtils;

var
	mas: array [0..7, 1..2] of integer;
  b: array [0..6,1..2] of integer;
   a,i,c,j,k,l, front1, front2, w, h, step: word;
  otv: boolean;

procedure outp(ans: boolean);
begin
	if ans then
  	writeln('POSSIBLE')
  else
  	writeln('IMPOSSIBLE');
end;


begin
	i:=0;
  otv:=false;
	assignfile(input, 'box.in');
  assignfile(output, 'box.out');
  reset(input);
  rewrite(output);
  for i:=1 to 6 do readln(mas[i,1],mas[i,2]);
  k:=0;
  i:=0;
  l:=1;
   while l<=5 do begin
   j:=l+1;
   if mas[l,1]<>-1 then begin
  	while j<=6 do begin
     if mas[j,1]<>-1 then
     if ((mas[l,1]=mas[j,1]) and (mas[l,2]=mas[j,2])) or ((mas[l,2]=mas[j,1]) and (mas[l,1]=mas[j,2]))
     then begin
      inc(k);
      b[k,1]:=mas[l,1];
      b[k,2]:=mas[l,2];
      mas[l,1]:=-1;
      mas[l,2]:=-1;
      mas[j,2]:=-1;
      mas[j,1]:=-1;
     end;
     inc(j);
    end;
   end;
   inc(l);
   end;
  if k<>3 then otv:=false else
  begin
   if b[1,1] = b[2,1] then begin
    if b[2,2] = b[3,1] then if b[3,2]=b[1,2] then otv:=true;
    if b[2,2] = b[3,2] then if b[3,1]=b[1,2] then otv:=true;
   end;
   if b[1,1] = b[2,2] then begin
    if b[2,1] = b[3,1] then if b[3,2]=b[1,2] then otv:=true;
    if b[2,1] = b[3,2] then if b[3,1]=b[1,2] then otv:=true;
   end;
   if b[1,2] = b[2,1] then begin
    if b[2,2] = b[3,1] then if b[3,2]=b[1,1] then otv:=true;
    if b[2,2] = b[3,2] then if b[3,1]=b[1,2] then otv:=true;
   end;
   if b[1,2] = b[2,2] then begin
    if b[2,1] = b[3,1] then if b[3,2]=b[1,1] then otv:=true;
    if b[2,1] = b[3,2] then if b[3,1]=b[1,2] then otv:=true;
   end;
  end;
  outp(otv);
end.
