using System; using System.Collections.Generic; using System.Linq; namespace No375{ public class Program{ public static void Main(string[] args){ var N = long.Parse(Console.ReadLine()); var input = N; var rl = new List(); if(input > 1){ var nl = Enumerable.Range(2, (int)Math.Sqrt(input)).ToList(); var sqrt = (int)Math.Sqrt(Math.Sqrt(input)) + 1; while(nl[0] <= sqrt){ var prime = nl[0]; rl.Add(prime); nl.RemoveAll(value => value % prime == 0); } rl.AddRange(nl); } var res = 0L; foreach(var i in rl){ while(N % i == 0){ N /= i; res += i - 1; } } res += N - 1; Console.WriteLine("{0} {1}", res, input - 1); } } }