#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1)

int main(){
  double a, b;
  double sum = 0, ave = 0, cnt = 0;
  while(scanf("%lf,%lf", &a, &b) != EOF){
    sum += a * b;
    ave += b;
    cnt++;
  }
  cout << (int)sum << endl;
  if(ave - (int)ave < 0.5){
    printf("%.0f\n", ave / cnt);
  }else{
    printf("%.0f\n", ave / cnt + 1);
  }
}