#include<iostream>
#include<stdio.h>

using namespace std;

int main(){

  int sum = 0, unit, qua, sumqua, i=0;
  char gomi;

  double ave;

  while(cin >> unit >> gomi >> qua){
    i++;
    sum += unit * qua;
    sumqua += qua;
  }



  ave = (double)sumqua/i;


  printf("%d\n%.0f\n",sum,ave);
  return 0;
  
}