By Ezequiel Rodrigues da Silva, PUC Goiás Brazil
Padmé Amidala, the Republic senator, was bored in her room in Coruscant and then her subordinate suggested that she visit the mall in the capital. The padawan Jorge was called to protect the senator on her mall tour. During the tour the senator got lost and then Jorge decided to use a device to track her, but this device shows only the number of the shop she actually is located.
The mall has a shape of a square matrix of width n (n is odd) and the shops are numbered from 1 to n2. The position (0, 0) means the upper left corner of the mall. The shops are distributed in a spiral fashion. The example below shows a representation of the mall for n = 5.
As the width of the mall can be very large and Jorge is in hurry to go back to train with his jedi master Guilherme, he decided to ask you to make a program that, given the width of the mall and the number of the shop where the senator Padmé is located, determines the position of this shop.
The input consists of several test cases and is finished by the end of file (EOF). The first and only line of each case contains two nonnegative integers n and s (1 ≤ n < 100, 1 ≤ s ≤ n2) indicating, respectively, the width of the mall and the number of the shop where the senator Padmé is located.
For each test case, print a single line containing two integers representing the position of the senator Padmé.
|Input Sample||Output Sample|