{$APPTYPE CONSOLE}
program probB;
type
	TPallet = record
  	w, h: Integer;
  end;

var
	w, h: array[1..6] of Integer;
  p: array[1..3] of TPallet;


function Fit(p1, p2, p3: TPallet): Boolean;
begin
	result := (p1.w = p2.w) and (p1.h = p3.h) and (p2.h = p3.w);
end;

function Rot(p: TPallet): TPallet;
var
	t: Integer;
begin
	t := p.h;
  p.h := p.w;
  p.w := t;
  result := p;
end;

procedure InputData;
var
	t, i: Integer;
begin
	for i:=1 to 6 do
  begin
  	Readln(w[i], h[i]);
    if w[i] > h[i] then
    begin
    	t := w[i];
      w[i] := h[i];
      h[i] := t;
    end;
  end;
end;

function FindPairs: Boolean;
var
	i, j: Integer;
  b: array[1..6] of Boolean;
  top: Integer;
begin
	for i:=1 to 6 do
  	b[i] := FALSE;
  top := 0;
  for i:=1 to 5 do
  	if not b[i] then
    begin
    	b[i] := TRUE;
      for j:=i+1 to 6 do
      if not b[j] and ((w[i] = w[j]) and (h[i] = h[j])) or ((w[i] = h[j]) and (h[i] = w[j])) then
      begin
    		b[j] := TRUE;
        Inc(top);
      	P[top].w := w[i];
      	P[top].h := h[i];
        break;
      end;
    end;
  result := top = 3;

end;


function Solve: Boolean;
begin
	if FindPairs then
  begin
  	result := Fit(p[1], Rot(p[3]), p[2]) or Fit(p[1], p[2], p[3]) or Fit(p[1], p[3], p[2]) or Fit(p[1], p[2], p[3]) or
    				  Fit(p[1], Rot(p[2]), p[3]) or Fit(p[1], p[2], Rot(p[3])) or Fit(p[1], Rot(p[2]), Rot(p[3])) or
    				  Fit(p[1], p[3], Rot(p[2])) or Fit(p[1], Rot(p[3]), Rot(p[2]));
  end
	else
  	result := False;
end;

begin
	Reset(input, 'box.in');
	Rewrite(output, 'box.out');
  InputData;
  if Solve then
  	Writeln('POSSIBLE')
  else
  	Writeln('IMPOSSIBLE');
  Close(output);
end.
