#include<iostream>
using namespace std;
int main() {
	int a, b;
	char c;
	int x;
	double y;
	x = 0;
	y = 0;
	double i = 0;
	while (cin >> a >> c >> b){
		x += a*b;
		y += b;
		i++;
	}
	cout << x << endl;
	y /= i;
	if (y - (int)y >= 0.5) {
		y += 1;
	}
	cout << y <<endl;
}