#include <bits/stdc++.h>
using namespace std;
int main(void) {
    double a,b,sum,tmp;
    int count;
    sum=0.0;
    tmp=0.0;
    count=0;
    char c;
    while (cin>>a>>c>>b) {
        sum=sum+a*b;
        tmp=tmp+b;
        count++;
    }
    cout<<sum<<endl;
    double ave=round(tmp/count);
    cout<<ave<<endl;
}
