import java.util.Scanner; public class No687 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int N = s.nextInt(); for(int i=1;i<=10;i++){ for(int j=1;j<=10;j++){ if(N == (i+j)){ System.out.println(i + " " + j); break; } } } } }