cloned from srcbox.
[furry-nemesis.git] / sector.pas
blob6b135b30c7a47f49b32726727252e8d52fa07c1d
1 var
2 x,y,z,p:longint;
4 begin
5 assign(input,'sector.dat'); reset(input);
6 assign(output,'sector.out'); rewrite(output);
7 readln(x,y,z,p);
8 //p:=p+1;
9 if p>=x*y*z then writeln('0 0 0')
10 else begin
11 writeln(p div z mod x,' ',p div z div x,' ',p mod z+1)
12 end;
13 close(input); close(output);
14 end.