using System; namespace prob638 { class Program { static void Main(string[] args) { long a = long.Parse(Console.ReadLine()); int ret = -1; bool flg = false; for (int i = 1; i < a/2+1; i++) { if (!ispower2(i) && !ispower2(a - i)) { flg = true; ret = i; break; } else { flg = false; } } if (flg==false) { Console.WriteLine(-1); } else { Console.WriteLine("{0} {1}", ret,a-ret); } } static bool ispower2(float v) { float tmp = 1; bool ret = false; while (true) { if (tmp>v) { return false; } if (v == tmp) { return true; } tmp = tmp * 2; } } } }