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

using namespace std;

int main(){

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

  while(cin >> unit >> gomi >> qua){
    i++;
    sum += unit * qua;
    sumqua += qua;
  }
printf("%d\n%.0f\n",sum,(double)sumqua/i);
  return 0;

}