#include<iostream>
#include<string>
using namespace std;
int main(){
	int a,b,c=0,d=0;
	char z;
	while(cin>>a>>z>>b){
		c+=a*b;
		d+=b;
		break;
	}
	cout<<c<<endl;
	double e=c/d;
	e+=0.5;
	int f=e;
	cout<<f<<endl;
	return 0;
}