import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.HashSet; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(1, in, out); out.close(); } static class Task { static HashSet twoPow = new HashSet<>(); static void setTwoPow(long max) { long n = 2; while (n < max) { twoPow.add(n); n *= 2; } } public void solve(int testNumber, Scanner in, PrintWriter out) { long n = in.nextLong(); setTwoPow(n); long a = n / 2; long b = n - a; while (a > 0 && twoPow.contains(a) || twoPow.contains(b)) { a--; b++; } if (a <= 0) { out.println(-1); } else { out.println(a + " " + b); } } } }