using System; namespace _638 { class Program { static void Main(string[] args) { int[] a = new int[] { 3,5,6,7 }; long n = long.Parse(Console.ReadLine()); if (n < 8) Console.WriteLine(-1); else { int i = 0; for (; true; i++) { long x = n - a[i]; while (x % 2 == 0) x /= 2; if (x != 1) break; } Console.WriteLine(a[i] + " " + (n - a[i])); } } } }