import java.util.*; public class Main { static Scanner s=new Scanner(System.in); public static void main(String[] args) { int n=s.nextInt(); if(n<=10) System.out.println(1+" "+(n-1)); else System.out.println(10+" "+(n-10)); } }