function main() {
  var
  n = 0,
  nsum = 0,
  ssum = 0;
  input.forEach(function(line){
    if(line.trim() === '') return;
    n += 1;
    line = line.split(',').map(parseFloat);
    nsum += line[1];
    ssum += line[0] * line[1];
  });
  console.log(ssum);
  console.log((nsum / n).toFixed(0));
}

var
input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main();
});