D:=[];; n:=60;;
for p in [1..80]*(1/500) do
 Y:=RandomSimplicialTwoComplex(n,p);;
 G:=FundamentalGroup(Y);
 Add(D,[p,G]);
od;
P:=[];
for i in [1..Length(D)] do
 if Length(RelatorsOfFpGroup(D[i][2]))=0 then
 Add(P,[D[i][1],Length(GeneratorsOfGroup(D[i][2]))]);
 else
 Add(P,[D[i][1],Length(GeneratorsOfGroup(D[i][2])), "red"]);
 fi;
od;
ScatterPlot(P); 
