#include <iostream>
#include<stdio.h>
using namespace std;
int main() {
	double sum,ave,cnt=0,num=0;
	double a,b;
	char ch;
	while(cin>>a>>ch>>b){
		cnt++;
		sum+=a*b;
		num+=b;
	}
	printf("%.0lf\n%.0lf\n",sum,num/cnt);
	return 0;
}
