#include <iostream>
#include <cstdio>
using namespace std;

int main() {
  int x, y, suma=0, sumb=0, cnt=0;
  while(scanf("%d%*c%d",&x,&y)==2) {
    suma+=x*y;
    sumb+=y;
    cnt++;
  }
  double ans=(double)sumb/cnt*10;
  if((int)ans%10>=5) {
    ans/=10;
    ans++;
  }
  int ansb=(int)ans;
  cout << suma << endl << ansb << endl;
  return 0;
}
