#include <iostream>
#include <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int val;
	int num;
	char tmp;
	int sum = 0;
	double average_num = 0;
	int counter = 0;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

	
#if INPUT_FROM_FILE
	while(ifs >> val >> tmp >> num){
#else
	while(std::cin >> val >> tmp >> num){
#endif
		sum += val * num;
		average_num += num;
		counter++;
	}
	
	average_num = std::round(average_num / counter);

	std::cout << sum << std::endl;
	std::cout << average_num << std::endl;
	return 0;
}

