#include <iostream>

using namespace std;

int main()
{
	int one, all, i;
	double many, heikin;
	
	all = 0;
	
	i = 0;
	
	while(cin >> one >> many){
	
		all += one * many;
		
		heikin += many;
		
		i++;
	}
	
	cout << all << endl << heikin / i << endl;

	
    return 0;
}