#include <iostream>

using namespace std;

int main(void) {
    int v = 0, q = 0, n = 0, a, b;
    char c;
    while (true) {
        cin >> a >> c >> b;
        if (cin.eof()) break;
        v += a;
        q += b;
        n++;
    }
    cout << v << endl;
    cout << (int)((double)q / n + 0.5) << endl;
    return 0;
}