import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    long t=0,n=0,c=0;
    foreach(a;stdin.byLine().map!(s=>s.split(",").map!(to!int).array())())
    {
        t+=a[0]*a[1];
        n+=a[1];
        ++c;
    }
    writeln(t);
    writeln((n+c/2)/c);
}