#include<iostream>

using namespace std;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int ps = 0;
    int qs = 0;
    int n = 0;

    int p, q;
    char c;
    while(cin >> p >> c >> q){
        ps += p * q;
        qs += q;
        ++n;
    }

    int mq = qs / n;
    if((qs % n) * 2 >= n){
        ++mq;
    }

    cout << ps << endl << mq << endl;

    return 0;
}
