#include<iostream>
#include<cstdio>
using namespace std;
int main() {
	int p, m;
	char c;
	int sum_p, sum_m, cnt, ave;
	while( cin >> p >> c >> m ){
		sum_p += p * m;
		sum_m += m;
		cnt++;
	}
	ave = (double) sum_m / cnt + 0.5;
	cout << sum_p << endl;
	cout << ave << endl;
}