program b;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var g,d: array[1..6] of integer;
  ser:array[1..12] of integer;
  i,j: integer;
  fin,fout: text;
  a,c,e:integer;
  stat:boolean;
begin
  assign (fin,'box.in');
  reset(fin);
  assign (fout,'box.out');
  rewrite(fout);
  for i:=1 to 6 do
       begin
       readln(fin,a,c);
       g[i]:=a*c;
       d[i]:=a+c;
       ser[i*2-1]:=a;
       ser[i*2] :=c;
       end;
    stat:=true;
  for j:=1 to 12 do
  begin
  e:=1;
  for i:=1 to 12 do
  if i<>j then
  begin
      if ser[j]=ser[i] then
        e:=e+1;
  end;
  if e mod 4<>0 then stat:=false;
  end;
  for j:=1 to 6 do
  for i:=1 to 6 do
     if j<>i then
     begin
     if g[j]=g[i] then
        begin
        g[j]:=0;
        g[i]:=0;
        end;
     if d[j]=d[i] then
        begin
        d[j]:=0;
        d[i]:=0;
        end;
      end;

  for i:=1 to 6 do
  begin
  if g[i]<>0 then stat:=false;
  if d[i]<>0 then stat:=false;
  end; 
  if stat then writeln(fout,'POSSIBLE')
  ELSE WRITELN(FOUT,'IMPOSSIBLE');
  close(fin);close(fout);
end.
