import std.stdio;
import std.algorithm;
import std.string;
import std.conv;

void main(){

    int sum = 0;
    int num = 0;
    int count = 0;
    while(true){
	auto s = readln();
	if(stdin.eof()) break;
	string[] n1 = split(chomp(s),',');
	int[2] n;
	n = [to!int(n1[0]),to!int(n1[1])];
	sum += n[0] * n[1];
	num += n[1];
	count++;
    }
    real ans = to!real(num)/to!real(count);
    int res;
    ans *= 10;
    if(ans%10 >= 5) res = to!int(ans)/10 + 1;
    else res = to!int(ans);
    writeln(sum);
    writeln(res);
}