3073
At the bus station in FinTaun M N adults and children who want to travel together to the neighboring town MinTaun. The price of a ticket is 100$. If an adult wants to travel with k children has to pay a ticket for him and k1 tickets for children (the ticket for one child is free).
Also, an adult can ride alone, in which case you pay a ticket for it. Additionally we know that children can not ride without being accompanied by an adult.
The first line of input gives the number N. The second row shows the number M.
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper NowIt is necessary to calculate what is the minimum and maximum number of dollars you can pay passengers for tickets and print them in two lines.
The bus will have at least one adult.
Name of Class: Bus
Sample input
Sample output
4
1000
10
1300
7
700
1
700
71
7100
24
9400
16
6400
64
7900
9458
945800
0
945800
63028
6302800
28217
9124400
80236
8023600
14868
9510300
59617
5961700
28452
8806800
192
9381200
93812
9400300
1
92800
928
92800