#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

int main()
{
    vector<int> amount, price;
    vector<int>::iterator it;
    char ch;
    int abuff, pbuff;
    int sum = 0;
    double avg;
    int c=0;
    while(cin >> abuff >> ch >> pbuff)
    {
        amount.push_back(abuff);
        price.push_back(pbuff);
    }
    for(it = price.begin(); it != price.end(); it++ )
        sum += *it;
    for(it = amount.begin(); it != amount.end(); it++)
        avg += *it;
    avg = ceil(avg - 0.5);
    cout << sum << endl;
    cout << (int) avg << endl;
    return 0;
}