#include<iostream>

using namespace std;

int main(){
	
	int price , num;
	int n = 0;
	int sp = 0;
	int tn = 0;
	
	while( cin >> price >> num ) {
		
		sp += price * num;
		tn += num;
		n++;
	}
	cout << sp << "\n";
	cout << (int) ((double)tn / (double) n + 0.5) << "\n";
		
  	return 0;
}
