#include<iostream>
#include<math.h>
using namespace std;

int main() {
	int a,b;
	int i = 0;
	int ca=0;
	int cb = 0;

	while (scanf("%d,%d", &a, &b) + 1) {
		ca += a;
		cb += b;
		i++;
	}
	double cc = static_cast<double>(cb);
	double cd = cc / i;
	double ce = round(cd);
	cout << ca << '\n' << ce << endl;

	return 0;
}