import java.util.Scanner; class no5000{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int n,t; n=stdIn.nextInt(); if(n/2==1) t=n/2-1; else t=n/2; System.out.print(t+" "+(n-t)); } }