p00045 Sum and Average
Create a program that reads the sales unit price and sales quantity and outputs the total sales amount and the average sales quantity.



Input

The input is given in the following format:


Sales unit price, sales quantity
Sales unit price, sales quantity
::
::


A comma-separated pair of unit price and quantity is given across multiple lines. All values ​​entered are greater than or equal to 0 and less than or equal to 1,000, and the number of unit price and quantity pairs does not exceed 100.

Output

Please output the total sales amount (integer) on the first line and the average sales quantity (integer) on the second line. If the average sales volume has a fraction (number after the decimal point), round off to the first decimal place.

Example

Input

100,20
50,10
70,35


Output

4950
22
```python
A=[]
while True:
	try:
		x,y=map(int,input().split(','))
		A.append((x,y))
	except:
		break
amount_of_sales=0
sales_number=0
for i in A:
	amount_of_sales+=i[0]*i[1]
	sales_number+=i[1]
print(amount_of_sales)
print(int(sales_number/len(A)+0.5))
```