#include int main(){ int x, y, l, k, c=0; scanf("%d%d%d", &x, &y, &l); c += y < 0 ? 2 : 0; x = x>0? x:-x; y = y>0? y:-y; printf("%d %d\n", x, y); for(k = 0; k < x;k+=l,c++); for(k = 0; k < y;k+=l,c++); if(x!=0) c++; printf("%d\n", c); return 0; }