#K80562. Chocolate Distribution

    ID: 35558 Type: Default 1000ms 256MiB

Chocolate Distribution

Chocolate Distribution

You are given the task of distributing chocolates among students. For each test case, you are provided with two integers \(N\) and \(M\) representing the number of students and the number of chocolates respectively. Your goal is to determine the maximum number of chocolates each student can receive if the chocolates are distributed equally, and the number of chocolates that will remain (which will be collected by the school).

Mathematically, each student gets \(\left\lfloor \frac{M}{N} \right\rfloor\) chocolates and the remainder \(M \bmod N\) represents the leftover chocolates.

Note: Use the above formulas in your solution. The division here is integer division.

inputFormat

The first line contains a single integer \(T\) denoting the number of test cases. Each of the following \(T\) lines contains two space-separated integers \(N\) and \(M\) where \(N\) is the number of students and \(M\) is the number of chocolates.

outputFormat

For each test case, output a single line with two integers: the maximum number of chocolates each student will get and the number of chocolates the school will collect. Separate the two numbers with a space.

## sample
3
5 13
10 99
4 8
2 3

9 9 2 0

</p>