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

int main() {
	int a;
	double b;
	int c[100];
	int ca=0, cb=0;
	int i = 0;
	while (scanf("%d,%d", &a, &c[i]) + 1) {
		ca += a;
		i++;
	}
	for (int j = 0; j <=i; j++) {
		cb += c[j];
	}
	b = cb / (i + 1);
	double round(b);
	cout << a << endl << b << endl;
	return 0;
}