#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;

#define REP(i,N) for(int i=0;i<(int)(N);++i)

typedef long long Int;

int main()
{
  Int sum = 0;
  Int u, n;
  Int x = 0;
  int c = 0;
  while (~scanf("%I64d, %I64d", &u, &n)) {
      sum += u * n;
      x += n;
      c++;
  }
  printf("%I64d\n", sum);
  printf("%.0f\n", (double)x / c);
  return 0;
}