Apartment number
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
An apartment building consists of N
apartments, distributed across P
entrances and Q
floors. Each floor of each entrance has the same number of apartments. Your task is to determine the entrance and floor where the apartment numbered K
is located.
Input
The input consists of a single line containing the integers N
, P
, Q
, and K
, where 1 ≤ K ≤ N ≤ 1000
and P
* Q ≤ N
.
Output
Output a single line with two integers: the entrance number and the floor number where the apartment numbered K
is found.
Examples
Input #1
Answer #1
Submissions 13K
Acceptance rate 32%