#include <iostream>
using namespace std;
int main() {
int N, P, Q, K, flatEntrance, flatFloor, entrance, floor;
cin >> N >> P >> Q >> K;
flatEntrance = N/P;
flatFloor = N/P/Q;
entrance = K/flatEntrance;
if (K%flatEntrance != 0){
entrance++;
}
if (K%flatEntrance == 0){
floor = Q;
} else {
floor = (K%flatEntrance)/flatFloor;
if (K%flatFloor != 0){
floor++;
}
}
cout << entrance << " " << floor << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgTiwgUCwgUSwgSywgZmxhdEVudHJhbmNlLCBmbGF0Rmxvb3IsIGVudHJhbmNlLCBmbG9vcjsKCWNpbiA+PiBOID4+IFAgPj4gUSA+PiBLOwoJZmxhdEVudHJhbmNlID0gTi9QOwogICAgZmxhdEZsb29yID0gTi9QL1E7CgllbnRyYW5jZSA9IEsvZmxhdEVudHJhbmNlOyAKCWlmIChLJWZsYXRFbnRyYW5jZSAhPSAwKXsKCQllbnRyYW5jZSsrOwoJfQoJaWYgKEslZmxhdEVudHJhbmNlID09IDApewoJICAgIGZsb29yID0gUTsKCX0gZWxzZSB7CgkJICAgIGZsb29yID0gKEslZmxhdEVudHJhbmNlKS9mbGF0Rmxvb3I7IAoJCSAgICBpZiAoSyVmbGF0Rmxvb3IgIT0gMCl7CgkJICAJICAgIGZsb29yKys7CgkJICAgIH0KICAgIH0KICAgIGNvdXQgPDwgZW50cmFuY2UgPDwgIiAiIDw8IGZsb29yIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==