program Box;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var fin,fout:text;
a,b,s,p,v:array [1..6] of integer;
g,f: array[1..6]of byte;
fl:boolean;
k:integer;
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]);
  fl:=false;
  for i:=1 to 6 do
    begin
    s[i]:=a[i]*b[i];
    p[i]:=a[i]+b[i];
    f[i]:=0;
    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;}
  k:=1;
  for i:=1 to 5 do
    for j:=i+1 to 6 do
      if (s[i]=s[j]) and (p[i]=p[j]) and (f[i]=0) and (f[j]=0) then begin
                                          f[i]:=k;
                                          f[j]:=k;
                                          g[k]:=i;
                                          k:=k+1;
                                        end;
  for i:=1 to 6 do if f[i]=0 then fl:=false
                             else begin

  if a[g[1]]=a[g[2]] then
                if ((b[g[2]]=b[g[3]]) and (b[g[1]]=a[g[3]]))
                or ((b[g[2]]=a[g[3]]) and (b[g[1]]=b[g[3]])) then fl:=true;
  if a[g[1]]=b[g[2]] then
                if ((a[g[2]]=b[g[3]]) and (b[g[1]]=a[g[3]]))
                or ((a[g[2]]=a[g[3]]) and (b[g[1]]=b[g[3]])) then fl:=true;
  if b[g[1]]=b[g[2]] then
                if ((a[g[2]]=a[g[3]]) and (a[g[1]]=b[g[3]]))
                or ((a[g[2]]=b[g[3]]) and (a[g[1]]=a[g[3]])) then fl:=true;
  if b[g[1]]=a[g[2]] then
                if ((b[g[2]]=a[g[3]]) and (b[g[3]]=a[g[1]]))
                or ((b[g[2]]=b[g[3]]) and (a[g[1]]=a[g[3]])) then fl:=true;
  end;

  if not fl then writeln(fout,'IMPOSSIBLE') else writeln(fout,'POSSIBLE');
  close(fin);
  close(fout);
end.
