var m:array[1..100000] of integer;
a,b,sum,sum2,n,k,i:integer;
begin
sum:=0;
k:=0;
sum2:=0;
readln(a,b,n);
randomize;
for i:=1 to n do begin m[i]:=random(a,b); if(m[i]<50) then begin sum:=sum+m[i]; k:=k+1; end; </p>
if(m[i]>=50) then sum2:=sum2+m[i]; end;
for i:=1 to n do write(m[i],' ');
writeln;
writeln((sum/k):5:3,' ',(sum2/(n-k):5:3));
end.