#! /usr/bin/perl

$NN="\n";
@arr=();
foreach $i (11..33) {
$arr[$i-11]=int((rand $i/0.27-$i-$#arr/12.7)/0.57-3.11);
#$arr[$i-11]=int($i/(i+11.17))*($i-11)+1;
}
print $#arr,' ',join ' ',@arr,$NN;
$ns=$#arr;
$sv=0;
$sr=0;
foreach $i (@arr) {
$sv+=$i;
$sr+=1./$i;
}
$myvr=$sv*$sr/$ns/$ns;
$mrc=rsc(15);
$m2=7 % 3;
print $ns,' ',$sv/$ns,' ',$ns/$sr,' ',1./$myvr,' ',$mrc,' ',$m2,$NN;
@bp7=(1,3,7,9,3,9,1,7);
#foreach $i (1..2) {
#print @bp7;
#}
print @bp7,$NN;
@rbase=(11,13,17,19,23,29,31,37);
%rbs={};
$t=0;
foreach $j (@rbase) {
$t+=1;
$rbs{$j}=$t;
}
$rcount=0;
@arr=(3);
$bp = -10;
$bps =0;
$bpc =30*1+10;
$bpct=30*1;
#print ' ';
@rcnt=();
foreach $i (1..328-1) {
$bn = 2*$i+1;
#$bp =0;
#if ($bp < -1)  {push(@arr,$bn);print '&';}
$bp =0;
foreach $b (@arr) {
if ($bp < 1) {
$mb = $bn % $b;
if ($mb < 1) {$bp=3;}
}
}
$bbn=0;
if ($bn > 9) {
foreach $b (3,5) {
$mb = $bn % $b;
if ($mb < 1) {$bbn=$bbn+1;}}
 
}
if ($bn > 3) {
if ($bps < 1) {
if ($bn > $bpc-1) {
$bpc=$bpc+$bpct;$bps = -1;$rcount+=1;print ' ',join ' ',@rcnt,$NN;
@rcnt=();
}
}
if ($bp < 1)  
{push(@arr,$bn);
if ($bn > 9) {print '&';}}
else
#{ if (($bbn < 1 ) & ($bn > 9)) {print $bn,$rcount,' ';push(@rcnt,$bn);}}
{ if (($bbn < 1 ) & ($bn > 9)) {print ' ';push(@rcnt,$rbs{$bn-$bpct*$rcount});}}
}
#print $bn,' ',$b,' ',$mb,'/',@arr,'/';

#print $bn,' ',join ' ',@arr,$NN;

}
print $NN,join ' ',@arr;



sub rsc {
my ($arg)=@_;
my $T=1;$TT=1;
while ($TT < $arg/2) {
$TT+=$T;
$T=$TT-$T;
}
return $TT;
}
