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

int main(){

  int a,b,num = 0;
  double ans = 0,count = 0;
  char c;

  while(cin >> a >> c >> b){

    ans = a * b + ans;
    num = num + b;
    count++;

  }

  printf("%.0lf\n%.0lf\n",ans,num/count);
} 