#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int p, n;
  int s = 0, t = 0, u = 0;
  char c;
  while (cin >> p >> c >> n) {
    s += p * n;
    t += n;
    u++;
  }
  cout << s << endl;
  cout << (int)(1. * t / u + 0.5) << endl;

  return 0;
}
