#include <iostream>
#include <cstdio>

using namespace std;

int main() {

	int i=0, value, num;
	double sumvalue=0, sumnum=0;

	while(scanf("%d %d", &value, &num)!=EOF) {
		sumvalue+=value*num;
		sumnum+=num;
		i++;
	}

	cout << sumvalue << endl << (int)((sumnum/(double)i)+0.5) << endl;

	return 0;

}