#include<iostream>
using namespace std;
int main(void) {
    int x,y,sum_xy=0,sum_y=0,ave=0,count=0;
    char c;
    while(cin >> x >> c >> y){
        sum_xy=sum_xy+x*y;
        sum_y=sum_y+y;
        ++count;
    }
    ave=sum_y/count + 1;
    cout << sum_xy << endl << ave << endl;
}
