#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <utility>
#include <numeric>

using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

const ullong MOD = 1000000000 + 7;

int main()
{
	int n = 0;
	int sum0 = 0;
	double sum1 = 0;

	string s;
	for (; cin >> s;)
	{
		stringstream ss;
		ss << s;

		int a, b;

		ss >> a;
		ss.ignore();
		ss >> b;


		sum0 += a* b;
		sum1 += b;
		n++;
	}

	cout << sum0 << endl;
	cout << (int)(sum1 / n + 0.5) << endl;
}
