#define _CRT_SECURE_NO_WARNINGS
#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 e = da/ v.size();
	double cb;
	cb = round(e);
	
	cout << ca << '\n' << cb << endl;

	return 0;
}