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 ~F~, seats in the middle rows cost ~M~, and seats in the back rows cost ~B~.
The organizers have sold ~T_F~ tickets for the front rows, ~T_M~ tickets for the middle rows, and ~T_B~ 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!
~0 \le F, M, B \le 10^4~
~0 \le T_F, T_M, T_B \le 10^4~
The first line contains 3 space-separated integers: ~F~, ~M~, and ~B~.
The second and last line contains 3 space-separated integers: ~T_F~, ~T_M~, and ~T_B~.
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.
9 5 4 14 26 37
~14+26+37 = 77~ people are coming, and ~9 \times 14 + 5 \times 26 + 4 \times 37 = 404~ worth of tickets have been sold.