#MTHA0000006. Chuyến xe cuối (The Last Bus Trip)
Chuyến xe cuối (The Last Bus Trip)
The Last Bus Trip
Version: Phuoc Hung OJ Extended
Problem Statement
There are students to transport using a vehicle with capacity . Every trip before the last carries students whenever at least students remain. Determine the minimum number of trips and the number of students on the last trip.
Input
One line contains two positive integers and .
Output
Print two integers: the minimum number of trips and the number of students on the last trip.
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
23 8
Output
3 7
Explanation
The first two trips carry students, leaving for the last trip, for trips in total.
Example 2
Input
40 10
Output
4 10
Explanation
is divisible by , so there are trips and the last trip still carries students.
Example 3
Input
1 50
Output
1 1
Explanation
There is only one student, so exactly one trip is needed and it carries student.