This page is still under construction.

Parts of this page are still being built. What you see may change.

Long Python

Time limit2sMemory limit512 MB

Summary
Given that a Python holds n whole Parrots or m whole Monkeys, find the minimum and maximum number of whole Parrots that fit into one Monkey.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

One, two, left, right,
two times two is very simple
boa constrictors are measured
five times five, of any height


Parrot

After Monkey and Parrot had thoroughly studied the length of the Boa Constrictor, they became very bored. Then Elephant remembered that another Python also lives in the forest, and it too can be measured! The friends immediately set off to find it.

Like the Boa Constrictor, the Python is whole, so it cannot be measured in halves. After measuring the Python, Monkey and Parrot learned that the Python holds nn whole Parrots or mm whole Monkeys. Delighted, Monkey ran off to tell Elephant the result. After she left, Parrot became interested in the following question: how many times does he fit into one Monkey?

Since Monkey has run off and he cannot measure her, Parrot decided to try to find out how many whole Parrots can fit into one Monkey, using the results of measuring the Python. Given nn and mm, find the minimum and maximum number of whole Parrots that can fit into one Monkey.

Input

The input file contains two integers nn and mm, each on its own line: the number of Parrots and the number of Monkeys in the Python, respectively (1≤n,m≤1091 \le n, m \le 10^9).

Output

Output two numbers to the output file: the minimum and maximum number of whole Parrots in one Monkey.

Examples1

  1. Example 1

    Input
    38
    5
    
    Expected output
    6
    7