#MTHA0000007. Chia nhóm (Forming Groups)
Chia nhóm (Forming Groups)
Forming Groups
Version: Phuoc Hung OJ Extended
Problem Statement
There are students. A teacher forms as many complete groups of exactly students as possible. Some students may remain. Determine the number of complete groups and the number of remaining students.
Input
One line contains two positive integers and .
Output
Print two integers: the number of complete groups and the number of remaining students.
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
29 6
Output
4 5
Explanation
Four groups use students, leaving students.
Example 2
Input
36 6
Output
6 0
Explanation
, so there are complete groups and no remainder.
Example 3
Input
5 9
Output
0 5
Explanation
, so no complete group can be formed and all students remain.