#!/usr/bin/env python # -*- coding: utf-8 -*- def memoize(f): cache = {} def helper(*args): if args not in cache: cache[args] = f(*args) return cache[args] return helper import sys from operator import itemgetter n = int(sys.stdin.readline().split(' ')[0]) @memoize def s2(n): if n <= 1: if n == 1: return True else: return False else: return s2(n / 2.) can = [] for i in xrange(n-1): can.append((i+1, n-(i+1))) can = filter(lambda ((x, y)): not s2(x) and not s2(y), can) can = sorted(can, key=itemgetter(0)) if len(can) == 0: print("-1") else: print("%d %d" % (can[0][0], can[0][1]))