x, y, l = io.read("*n"), io.read("*n"), io.read("*n") fw = function(n) return math.ceil(math.abs(n)/l) end print(((y<0) and 2 or (x~=0) and 1 or 0) , fw(x) , fw(y))