//17
#include<iostream>
#include<iomanip>

using namespace std;

int main(){
  int sum=0,na=0;
  double a=0;
  for(int t,s;(cin>>t).ignore()>>s;){
    sum+=t*s;
    a+=s;
    na++;
  }
  cout<<sum<<endl<<fixed<<setprecision(0)<<a/na<<endl;
  return 0;
}