#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int cost=0, sumcost=0, soldnum=0,sumsoldnum=0;
    int num=0;
    char t;
    while(cin>>cost)
    {
        
        if(cin.eof())break;
        cin >>t>>soldnum;
        sumcost+= cost*soldnum;
        sumsoldnum += soldnum;
        num += 1;
    }
    printf("%d\n%.0f\n",sumcost,((float)sumsoldnum)/num);

    return 0;
}