float a,x,y;b;main(f){for(;~scanf("%f",&a);)f--?x+=a*pow(b,a-1),y+=++a?pow(b,a)/a:log(b):(b=a);b=!printf("%f\n%f",x,y);}