Movie Ticket Peter is an IT professional. He spent his weekend watching good movies in…
- User
Movie Ticket
Peter is an IT professional. He spent his weekend watching good movies in the theater, So one weekend, Peter went to a theater to watch a movie. At the ticket counter, he brought a ticket with a ticket number
The seats in the theater were arranged in a 2-D grid fashion in m rows and in columns. The seats were numbered, starting from one in row-wise order. Peter searched for his seat and got seat number X from the ticket
Can you find the row and column number where Peter will sit?
Note: The seats are numbered starting from one in row-wise order.
Input
The first input is an integer corresponding to the number of rows.
The second input is an integer corresponding to the number of columns.
The third input is an integer corresponding to the seat number.
Output
The first output is an integer corresponding to the row number of the seat location.
The second output is an integer corresponding to the column number of the seat location.
Constraints
1<=m<=10000
1<n<=10000
- Assistant