            import java.util.*;
            import java.lang.*;
            import java.io.*;
            
                public class ProblemA {
                public static void main (String[] args) {
                    PrintWriter pw=new PrintWriter(System.out);
                    Scanner sc=new Scanner(System.in);
                  
                          int n=sc.nextInt();
                         
                      if(n%2==0&&n/2!=2)
                      pw.println(2+" "+n/2);
                      else
                      pw.println(1+" "+n);
                    pw.close();
                	}
                }