#MTHA0000001. Thương và số dư (Quotient and Remainder)

Thương và số dư (Quotient and Remainder)

Quotient and Remainder

Version: Phuoc Hung OJ Extended

Problem Statement

Given two positive integers AA and BB, integer division determines unique integers QQ and RR such that A=Q⋅B+RA = Q\cdot B + R and 0≤R<B0 \le R < B. Determine the quotient QQ and remainder RR.

Input

One line contains two positive integers AA and BB.

Output

Print two integers QQ and RR: the integer quotient and the remainder when dividing AA by BB.

Subtasks

  • Subtask 1 (30 points):
    • 1≤A≤1061 \le A \le 10^6.
    • 1≤B≤1061 \le B \le 10^6.
  • Subtask 2 (70 points):
    • 1≤A≤10181 \le A \le 10^{18}.
    • 1≤B≤10181 \le B \le 10^{18}.

Examples

Example 1

Input

47 6

Output

7 5

Explanation

Since 47=7⋅6+547 = 7\cdot 6 + 5, the quotient is 77 and the remainder is 55.

Example 2

Input

81 9

Output

9 0

Explanation

Since 81=9⋅981 = 9\cdot 9, the remainder is 00.

Example 3

Input

5 12

Output

0 5

Explanation

Because 5<125<12, no full group of size 1212 can be formed; the quotient is 00 and the remainder is 55.