#include<iostream>
#include<numeric>
#include<vector>
#include<stdio.h>

std::vector<int> sum;
std::vector<double> num;

int main()
{
	int a, b;
	while( scanf( "%d,%d", &a, &b ) != EOF ){
	 	sum.push_back( a * b );
		num.push_back( b );
	}
	
	printf( "%d\n", std::accumulate( sum.begin(), sum.end(), 0 ) );

	printf( "%.0f\n", std::accumulate( num.begin(), num.end(), 0.0 ) / (double)num.size() );

 	return 0;
}