Long division on a short number#852

Long division on a short number

2 seconds
122.174 megabytes
Very easy

Given a nonnegative integer and a positive integer , find \left\lfloor \frac{m}{n} \right\rfloor and the remainder where m = qn + r and 0 \leq r < n.

Input

The first line contains the number , the second line contains the number (0 \leq m \leq 10^{60000}, 1 \leq n \leq 1\,000\,000).

Output

Print (the value of \left\lfloor \frac{m}{n} \right\rfloor) on the first line, and (the remainder) on the second line.

Examples

Example 1

Loading
Loading