import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner s = new Scanner(System.in); int X = s.nextInt(); int Y = s.nextInt(); int L = s.nextInt(); int ans = 0; int numx = 0; int numy = 0; if (X<0){ X = -X; } if (Y<0){ Y = -Y; } if (Y!=0){ if (Y<0){ ans = ans + 1; } numy = Y/L; if (Y%L!=0){ numy = numy + 1; } }else if (X!=0){ ans = ans + 1; numx = X/L; if (X%L!=0){ numx = numx + 1; } ans = ans + numx + numy; System.out.println(ans); System.out.println(numx); System.out.println(numy); } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); } }