/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
{
int N, P, Q, K, flatEntrance, flatFloor, entrance, floor;
Scanner sc
= new Scanner
(System.
in); N = sc.nextInt();
P = sc.nextInt();
Q = sc.nextInt();
K = sc.nextInt();
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++;
}
}
System.
out.
format(" %d %d", entrance, floor
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlpbnQgTiwgUCwgUSwgSywgZmxhdEVudHJhbmNlLCBmbGF0Rmxvb3IsIGVudHJhbmNlLCBmbG9vcjsKCQlTY2FubmVyIHNjID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlOID0gc2MubmV4dEludCgpOwoJCVAgPSBzYy5uZXh0SW50KCk7CgkJUSA9IHNjLm5leHRJbnQoKTsKCQlLID0gc2MubmV4dEludCgpOwoJCWZsYXRFbnRyYW5jZSA9IE4vUDsKICAgIAlmbGF0Rmxvb3IgPSBOL1AvUTsKCQllbnRyYW5jZSA9IEsvZmxhdEVudHJhbmNlOyAKCQlpZiAoSyVmbGF0RW50cmFuY2UgIT0gMCl7C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