#include <iostream>
#include <cmath>
using namespace std;
int main() {
freopen("power.in", "r", stdin);
freopen("power.out", "w", stdout);
long long int n, b, v;
bool a = false;
cin >> n;
for (int i = 2; i < n; i += 2) {
for (int j = 2; j < n; j += 2) {
if (j + i == n && j != i) {
b = i;
v = j;
a = true;
cout << b << " " << v;
return 0;
}
}
}
cout << -1;
return 0;
}