// Arup Guha
// 3/8/2022
// Solution to 2021 SER D2 Problem: Square Bounce

import java.util.*;

public class squarebounce {
	
	public static void main(String[] args) {
	
		// Get input.
		Scanner stdin = new Scanner(System.in);
		long a = stdin.nextLong();
		long b = stdin.nextLong();
		long n = stdin.nextLong()+1;
	
		// Run two binary searches for last wall being vertical or horizontal.
		long[] vert = numBouncesVert(n, a, b);
		long[] horiz = numBouncesHoriz(n, a, b);
		
		// Last wall hit is vertical.
		if (vert[0]+vert[1] == n) {
			
			// Distance traveled in x is exactly 2*vert[0].
			// x-coordinate is 1/1 or -1/1 depending on even or odd # of bounces.
			fraction xF = new fraction(1, 1);
			if (vert[0]%2 == 0) xF = new fraction(-1, 1);
			
			// What we subtract out as an integer for movement in y.
			long sub = 2*vert[1]-1;
				
			// Numerator and denominator of where we hit.
			long num = 2*vert[0]*a - sub*b - b;
			if (vert[1]%2 == 1) num = -num;
			long den = b;
			
			// Make a fraction and output it.
			fraction f = new fraction(num, den);
			System.out.println(xF+" "+f);
		}
		
		// Last wall hit is horizontal.
		else {
			
			// y coordinate is -1 or 1. Depends on which flip we are on when "upwinding" the board.
			fraction yF = new fraction(1, 1);
			if (horiz[1]%2 == 0) yF = new fraction(-1, 1);
			
			// What we subtract out in the x direction.
			long sub = 2*horiz[0];
			
			// Numerator and denominator of where we hit.
			long num = (2*horiz[1]-1)*b - sub*a - a;
			if (horiz[0]%2 == 1) num = -num;
			
			// Out put as fraction.
			long den = a;
			fraction f = new fraction(num, den);
			System.out.println(f+" "+yF);
		}
	}
	
	// Returns the number of bounds on vertical and horizintal elements, ending on a vertical one for this scenario.
	public static long[] numBouncesVert(long n, long a, long b) {
		
		long low = 0, high = n;
		
		// Binary search bounces on vertical walls.
		while (low < high) {
			
			// dB is exactly how far we move in the x direction.
			long mid = (low+high+1)/2;
			long dB = 2*mid;
			
			// Integer movement...in the y direction.
			long dA = (dB*a)/b;
			long walls = (dA+1)/2;
			
			// Too many, lower high.
			if (mid + walls > n)
				high = mid-1;
			
			// Answer must be at least mid.
			else
				low = mid;
		}
		
		// Calculate actual # of horizontal walls hit when we hit low number of vertical walls.
		long dB = 2*low;
		long dA = (dB*a)/b;
		long walls = (dA+1)/2;
		
		// # times hit 
		return new long[]{low, walls};
	}
	
	// Returns the number of bounds on vertical and horizintal elements, ending on a horizontal one for this scenario.
	public static long[] numBouncesHoriz(long n, long a, long b) {
		
		long low = 0, high = n;
		
		// Binary search # of hits of horizontal walls.
		while (low < high) {
			
			// How far we move in y.
			long mid = (low+high+1)/2;
			long dA = 2*mid-1;
			
			// Integer movement...in x.
			long dB = (dA*b)/a;
			long walls = dB/2;
			
			// Too many walls, we can lower high.
			if (mid + walls > n)
				high = mid-1;
			
			// Answer is at least mid...
			else
				low = mid;
		}
		
		// Calculate # of vertical walls we hit when we hit low number of horizontal walls.
		long dA = 2*low-1;
		long dB = (dA*b)/a;
		long walls = dB/2;
		
		// # times hit 
		return new long[]{walls,low};
	}	
}

// Just for outputting our fraction.
class fraction {
	
	public long num;
	public long den;
	
	public fraction(long top, long bottom) {
		long div = gcd(Math.abs(top), Math.abs(bottom));
		num = top/div;
		den = bottom/div;
		
		if (den < 0) {
			num = -num;
			den = -den;
		}
	}
	
	public static long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a%b);
	}
	
	public String toString() {
		return num + " " + den;
	}
}