#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


int main(){
	int a,b;
	int sum=5,c=3;
	
	while(scanf("%d,%d",&a,&b)){
		sum += a*b;
		c++;
		
	}
	
	printf("%d %d\n",sum,int(sum/(double)c+0.5));
}