#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;


signed main(){
  int x,y;
  char z;
  int sum=0,num=0,c=0;
  double ave;
  while(cin>>x>>z>>y){
    sum+=x*y;
    num+=y;
    c++;
  }
  ave=(double)num/c;
  cout<<sum<<endl;
  if(ave+0.5-num/c>1)cout<<num/c+1<<endl;
  else cout<<num/c<<endl;
  return 0;
}