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

public class hotel_aa {
	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();
		PrintWriter out = new PrintWriter("hotel.out");
		out.println((3 - (n % 3)) % 3 + " "
				+ ((n - 1) / 3 + 1 - ((3 - (n % 3)) % 3)));
		out.close();
	}
}
