#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<char, int>P;

float func(float n) {
	float f = (float)((int)n);
	if (n - f < 0.5)return f;
	return f + 1;
}
int main() {
	float sum = 0, cnt = 0;
	float i, j;
	while (scanf("%f,%f", &i, &j) != EOF) {
		sum += i; cnt += j;
	}
	cout << sum << endl << func(sum / cnt) << endl;
	return 0;
}