Generous Vasya#7815

Generous Vasya

1 second
128 megabytes
Very easy

Vasya took apples to school. During each break, he divided his apples equally among himself and friends (that is, among k+1 people). If there were apples left after the division, Vasya ate all the leftover apples but kept his share. On each subsequent break, Vasya repeated these actions with the apples he still had. After the last lesson, there were no apples left.

How many lessons did Vasya have, and how many apples did Vasya eat as leftovers?

Input

The input contains two integers (1 \le n \le 10^9) and (1 \le k \le 100).

Output

Print two integers: the number of lessons Vasya had, and the total number of apples he ate as leftovers.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

The school day begins and ends with a lesson.