#MTHA0000013. Vạch chia cuối cùng (The Last Major Mark)
Vạch chia cuối cùng (The Last Major Mark)
The Last Major Mark
Version: Phuoc Hung OJ Extended
Problem Statement
On a ruler of length , integer positions are numbered from to . Positions are marked as major marks. Determine the number of major marks and the position of the last one. If there is no major mark, the last position is defined as .
Input
One line contains two positive integers and .
Output
Print two integers: the number of major marks and the position of the last major mark.
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
25 6
Output
4 24
Explanation
The major marks are at , so there are marks and the last one is at .
Example 2
Input
5 8
Output
0 0
Explanation
The smallest positive multiple of is , so there is no major mark and the last position is defined as .
Example 3
Input
1000000000000 1000000
Output
1000000 1000000000000
Explanation
There are marks; since is divisible by , the last mark is exactly at .