#include <iostream>

using namespace std;

int main() {
    int sum = 0, quantity = 0, count = 0;
    int a, b;
    char c;
    while (cin >> a >> c >> b) {
        sum += a * b;
        quantity += b;
        count ++;
    }
    cout << sum << endl;
    cout << quantity / count + ((quantity % count) * 2 >= count ? 1 : 0) << endl;

    return 0;
}