#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    ios::sync_with_stdio(false);

    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 << setprecision(0) << fixed << static_cast<double>(quantity) / count << endl;

    return 0;
}