import java.util.Scanner; class Main{ static boolean isprime(long x){ if(x==1) return false; for(long i=2;i*i<=x;i++) if(x%i==0) return false; return true; } public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ long n=sc.nextLong(); if(isprime(n)) System.out.println(n); else{ boolean flag=true; for(long i=3;i*i<=n;i++){ System.out.println(i); if(n%i==0){ System.out.println(i); flag=false; break; } } if(flag) System.out.println(n/2); } } } }