## Mock CCC '22 Contest 2 J1 - Opening Ceremony

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

The Winter Olympics opening ceremony will be happening soon! The organizers have planned to host it in a stadium with 3 seats with different costs: seats in the front rows cost , seats in the middle rows cost , and seats in the back rows cost .

The organizers have sold tickets for the front rows, tickets for the middle rows, and tickets for the back rows. Unfortunately, their calculator broke, so they need you to help them find out how much money they will get from these tickets and how many people are expected to come to the ceremony!

#### Input Specification

The first line contains 3 space-separated integers: , , and .

The second and last line contains 3 space-separated integers: , , and .

#### Output Specification

Output on a single line two space-separated integers: the number of people coming to the ceremony and how much money they get from the tickets.

#### Sample Input

9 5 4
14 26 37

#### Sample Output

77 404

#### Explanation

people are coming, and worth of tickets have been sold.