#include<iostream>
using namespace std;
int main()
{
	int a, b;
	char s;
	int ans = 0;
	int n = 0;
	int count = 0;
	while (cin >> a >> s >> b){
		ans += a*b;
		n += b;
		count++;
	}
	printf("%d\n", ans);
	ans = n / count + 0.5;
	printf("%d\n", ans);
}