program b_;

{$APPTYPE CONSOLE}

uses
  SysUtils;

Type
  Trec = record
    a,b:integer;
    end;
  Tarray = array [1..6] of Trec;
procedure swap(var a,b:integer);
var
  t:integer;
begin
  t:=a;
  a:=b;
  b:=t;

end;

procedure obr(var a,b:integer);
begin
  if a>b then
    swap(a,b);
end;

procedure sort(var c: Tarray);
var
  i,min,j,t,h:integer;
  work:Trec;
begin
	for i:=1 to 5 do
  begin
  	min:=i;
    for j:=i+1 to 6 do
    begin
    	if c[min].a>c[j].a then
      	min:=j;
    end;
    work:=c[i];
    c[i]:=c[min];
    c[min]:=work;
  end;
end;

procedure sort2(var c: Tarray);
var
  i,min,j,t,h:integer;
  work:Trec;
begin
	for i:=1 to 5 do
  begin
  	min:=i;
    for j:=i+1 to 6 do
    begin
    	if c[min].b>c[j].b then
      	min:=j;
    end;
    work:=c[i];
    c[i]:=c[min];
    c[min]:=work;
  end;
end;

function  equal(a,b:trec):boolean;
begin
  equal:=((a.a=b.a) and (a.b=b.b));

end;

function  min(a,b:integer):integer;
begin
  if a>b then
    min:=b else
      min:=a;
end;

function  max(a,b:integer):integer;
begin
  if a>b then
    max:=a else
      max:=b;
end;

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

procedure quit;
begin
  writeln('IMPOSSIBLE');
  halt;
end;

var
  i,a,b:integer;
  st: Tarray;
  mas: Tarray;
  t:Trec;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  assign(INPUT,'box.in');
  assign(output,'box.out');
  for i:=1 to 6 do
    begin
      readln(a,b);
      obr(a,b);
      st[i].a:=a;
      st[i].b:=b;
    end;
  sort(st);
  sort2(st);
  for i:=1 to 3 do
    if not equal(st[2*i-1],st[2*i]) then
      quit else
        mas[i]:=st[2*i];
  if mas[1].a =mas[2].a then
    begin
      t.a:=min(mas[1].b,mas[2].b);
      t.b:=max(mas[1].b,mas[2].b);
      outp(equal(mas[3],t));
    end else

      if mas[1].b = mas[2].b then
        begin
          t.a:=min(mas[1].a,mas[2].a);
          t.b:=max(mas[1].a,mas[2].a);
          outp(equal(mas[3],t));
        end else
           if mas[1].a=mas[2].b then
             begin
               t.a:=min(mas[1].b,mas[2].a);
               t.b:=max(mas[1].b,mas[2].a);
               outp(equal(mas[3],t));
             end else
               if mas[1].b=mas[2].a  then
                 begin
                   t.a:=min(mas[1].a,mas[2].b);
    	      	     t.b:=max(mas[1].a,mas[2].b);
        		       outp(equal(mas[3],t));
      	         end else
                   quit;

end.
