import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class hotel_aa_loop {
	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(new File("hotel.in"));
		int n = in.nextInt();
		if (n < 2 || n > 100 || in.hasNext()) {
			throw new Error("Assertion!!!");
		}
		in.close();
		int bestTwo = 100;
		int bestThree = 100;
		for (int i = 0; 2 * i <= n; i++) {
			int m = n - 2 * i;
			if (m % 3 == 0) {
				int j = m / 3;
				if (bestTwo + bestThree > i + j) {
					bestTwo = i;
					bestThree = j;
				}
			}
		}
		PrintWriter out = new PrintWriter("hotel.out");
		out.println(bestTwo + " " + bestThree);
		out.close();
	}
}
