program Box;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var fin,fout:text;
a,b,s,p,v:array [1..6] of integer;
f: array[1..6]of boolean;
K:BOOLEAN;
i,j,flag,tm:integer;
  begin
  assign(fin,'box.in');
  assign(fout,'box.out');
  reset(fin);
  rewrite(fout);
  for i:=1 to 6 do
  readln(fin,a[i],b[i]);
  flag:=0;
  for i:=1 to 6 do
    begin
    s[i]:=a[i]*b[i];
    p[i]:=a[i]+b[i];
    f[i]:=true;
    end;
{  for m:=1 to 5 do
    for n:=m+1 to 6 do
      if (p[n]=p[m]) and (s[n]=s[m]) then begin
                                           v[m]:=v[m]+1;
                                           flag:=flag+1;
                                           end;
  for m:=1 to 5 do
    if (v[m]<>0) or (v[m]<>3) or (v[m]<>1) then begin
                                                writeln(fout,'IMPOSSIBLE');
                                                close(fin);
                                                close(fout);
                                                halt;
                                                end;}
  for i:=1 to 6 do
    for j:=1 to 6 do
      if (i<>j) and (s[i]=s[j]) and (p[i]=p[j]) and (f[i]) and (f[j]) then begin
                                          f[i]:=false;
                                          f[j]:=false;
                                        end;
  k:=false;
  for i:=1 to 6 do k:=(k or f[i]);
  if k then writeln(fout,'IMPOSSIBLE') else writeln(fout,'POSSIBLE');
  close(fin);
  close(fout);
end.
