#include<iostream>
using namespace std;

int main(){
	int sum=0,num=0,tanka,suuryo,hito=0;
	char ch;
	while(cin>>tanka>>ch>>suuryo){
		sum+=tanka*suuryo;
		num+=suuryo;
		hito++;
	}
	cout<<sum<<endl;
	cout<<num/hito<<endl;
	return 0;
}