#include <iostream>
#include <cstdio>
using namespace std;
int main(void){
    // Here your code !
int n,d,sum=0,D=0,cout=0;
char c;


while(cin>>n>>c>>d){
sum+=(n*d);
D=D+d;
cout++;
}

D=(double)D/cout+0.5;
 cout << sum << "\n" << D << endl;

}