#include <stdio.h>
	int main(){
		int  tanka,su,kei=0,cnt=0,sukei=0;
		double avrg;
	while(scanf("%d,%d",tanka,su)!=EOF){
			kei = kei + tanka;
			sukei = sukei + su;
			cnt++;
			
	}
	avrg=sukei/su;
	printf("%d %f",kei,avrg);
	return 0;
	}