#include <iostream>
using namespace std;

int main() {
	int sum,count,in2c;
	int in1,in2;
	char x;
	in2c=sum=count=0;
	
	while(cin>>in1>>x>>in2){
		sum+=in1*in2;
		in2c+=in2;
		count++;
	}
	cout<<sum<<" "<<(int)(1.0*in2c/count+0.5)<<endl;
	return 0;
}