program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a,p:array[1..6,1..2] of integer;
    i,j,s,n:word;
begin
  n:=0;
  assign(input,'box.in');
  reset(input);
   for i:=1 to 6 do
    begin
     read(a[i,1]); read(a[i,2]);
    end;
  close(input);
  n:=0;
  for i:=1 to 6 do
  for j:=1 to 6 do
     if ((i<>j) and (a[j,1]+a[j,2]>0) and
        ( ((a[i,1]=a[j,1]) and  (a[i,2]=a[j,2]))
        or((a[i,1]=a[j,2]) and  (a[i,2]=a[j,1])) ))
     then
      begin
       inc(n);
        p[n,1]:=a[i,1];
        p[n,2]:=a[i,2];
        a[i,1]:=-1;
        a[i,2]:=-1;
        a[j,1]:=-1;
        a[j,2]:=-1;
      end;
s:=0;
  for i:=1 to 3 do
   for j:=1 to 3 do
    begin
     if (p[i,1]<>0) and (p[i,1]=p[j,1]) then begin p[i,1]:=0; p[j,1]:=0; inc(s) end;
     if (p[i,1]<>0) and (p[i,1]=p[j,2]) then begin p[i,1]:=0; p[j,2]:=0; inc(s) end;
     if (p[i,2]<>0) and (p[i,2]=p[j,1]) then begin p[i,2]:=0; p[j,1]:=0; inc(s) end;
     if (p[i,2]<>0) and (p[i,2]=p[j,2]) then begin p[i,2]:=0; p[j,2]:=0; inc(s) end;
    end;
  assign(output,'box.out');
  rewrite(output);
    if s=3 then write('POSSIBLE') else write('IMPOSSIBLE');
  close(output);
end.
