URI Online Judge | 3087

By Ezequiel Rodrigues da Silva, PUC Goiás Brazil

Timelimit: 1

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 (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.

## Input

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 and s (1 ≤ < 100, 1  s  n2) indicating, respectively, the width of the mall and the number of the shop where the senator Padmé is located.

## Output

For each test case, print a single line containing two integers representing the position of the senator Padmé.

 Input Sample Output Sample 5 3 99 1 11 1 3 7 9 9 3 3 49 49 5 5 0 0 3 5