{$I-}
const
  InFile  = 'input.txt';
  OutFile = 'output.txt';

type
  WH = record
    w, h : integer;
  end;
  
var
  inf, outf : textfile;
  a         : array[1..6] of WH;

procedure Init;
begin
  Assign(inf, InFile);
  Assign(outf, OutFile);
  Reset(inf);
  Rewrite(outf);
end;

procedure Run;
var
  i, j, k, max, tt : integer;
  t                : WH;
  res              : boolean;
  aa, bb, cc       : WH;
begin
  for i := 1 to 6 do 
  begin
    Readln(inf, a[i].w, a[i].h);
    if a[i].w > a[i].h then 
    begin
      tt := a[i].w;
      a[i].w := a[i].h;
      a[i].h := tt;
    end;
  end;

  for k := 1 to 6 do
  begin
    for i := 1 to 5 do
    begin
      max := i;
      for j := i + 1 to 6 do
        if (a[j].w > a[max].w)or
           ((a[j].w = a[max].w)and(a[j].h > a[max].h)) then max := j;
      t := a[i];
      a[i] := a[max];
      a[max] := t;
    end;
  end;

  res := False;

  if (a[1].w = a[2].w)and(a[1].h = a[2].h)and
     (a[3].w = a[4].w)and(a[3].h = a[4].h)and
     (a[5].w = a[6].w)and(a[5].h = a[6].h) then
  begin
    if (a[1].w = a[5].h)and(a[1].h = a[3].h)and(a[3].w = a[5].w) then res := True;
  end;                                                        
  if res then
    Write(outf, 'POSSIBLE')
  else
    Write(outf, 'IMPOSSIBLE');
end;

procedure Done;
begin
  Close(inf);
  Close(outf);
end;


begin
  Init;
  Run;
  Done;
  Halt(0);
end.