program pb;

const infile  = 'box.in';
      outfile = 'box.out';

var w, h : array[1..6]of longint;

procedure init;
var i : longint;
 begin
  assign(input, infile); reset(input);
  assign(output, outfile); rewrite(output);
  for i := 1 to 6 do read(w[i], h[i]);
 end;

var use : array[1..6]of byte;
    perm : array[1..6]of byte;
    q : longint;

function getw(id : longint) : longint;
var r : longint;
 begin
  r := perm[id];
  if q and (1 shl (id - 1)) > 1 then getw := h[r] else getw := w[r];
 end;

function geth(id : longint) : longint;
var r : longint;
 begin
  r := perm[id];
  if q and (1 shl (id - 1)) > 1 then geth := w[r] else geth := h[r];
 end;

function check : boolean;
 begin
  check := false;
  if getw(1) <> getw(2) then exit;
  if getw(2) <> getw(3) then exit;
  if getw(3) <> getw(4) then exit;
  if getw(4) <> getw(1) then exit;
  if geth(1) <> geth(3) then exit;
  if geth(2) <> geth(4) then exit;
  if getw(6) <> getw(5) then exit;
  if geth(6) <> geth(5) then exit;
  if getw(6) <> geth(2) then exit;
  if geth(6) <> geth(1) then exit;
  check := true;
 end;

procedure rec(id : longint);
var i : longint;
 begin
  if id = 7 then begin
    for i := 0 to 63 do begin
      q := i;
      if check then begin
        writeln('POSSIBLE');
        close(output);
        halt(0);
       end;
     end;
    exit;
   end;
  for i := 1 to 6 do
   if use[i] = 0 then begin
     use[i] := 1;
     perm[id] := i;
     rec(id + 1);
     use[i] := 0;
    end;
 end;

procedure solve;
 begin
  fillchar(use, sizeof(use), 0);
  rec(1);
 end;

procedure save;
 begin
  writeln('IMPOSSIBLE');
  close(output);
 end;

begin
 init;
 solve;
 save;
end.
