#include<bits/stdc++.h>
using namespace std;
int main(void){
	int n,m;
	string s;
	int sum,ave,cnt;
	sum=0;
	ave=0;
	cnt=0;
	while(scanf("%d,",&n)!=EOF){
		cin>>m;
		//cout<<n<<m<<endl;
		sum+=n*m;
		ave+=m;
		cnt++;
	}
	cout<<sum<<endl;
	if(ave%cnt==0)	cout<<ave/cnt<<endl;
	else{
		if(ave%cnt*10/cnt>=5)	cout<<ave/cnt+1<<endl;
		else			cout<<ave/cnt<<endl;
	}
	return 0;
}
