ADA Training September 7
Vasya took n apples to school. At the break, he divided his apples among himself and k friends so that everyone would get an equal share. If there were apples, then Vasya ate them, and left his share. At the next breaks, the boy repeated his actions. How many lessons did Vasya have and how many apples did he eat if there were no apples left after the last lesson? The school day begins and ends with a lesson.
Two integers n (1 ≤ n ≤
109) and k (1 ≤ k ≤ 100).
Print the number of the lessons and the number of apples that Vasya ate.