#include<iostream>
#include<vector>
#include<cmath>
using namespace std;

int main() {
	int a,b;
	vector<int>v;
	int ca=0;

	while (scanf("%d,%d", &a, &b) + 1) {
		ca += a;
		v.push_back(b);
	}

	int da = 0;
	int k = v.size();

	for (int i = 0; i <k; i++) {
		da += v[i];
	}

	double d = static_cast<double>(da);
	double e = d / v.size();
	double cb;
	cb = round(e);
	int cc;
	cc = static_cast<int>(cb);
	cout << ca << '\n' << cc << endl;

	return 0;
}