#include <bits/stdc++.h>
const int inf = 0x3f3f3f3f;
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n == 1 || n == 2) {
    printf("-1\n");
    return 0;
  }
  if (n & 1)
    cout << (n * n - 1) / 2 << " " << (n * n + 1) / 2 << endl;
  else {
    long long temp = (long long)sqrt(n * 2 + 1);
    if ((temp * temp - 1) / 2 == n && (temp & 1)) {
      cout << temp << " " << (temp * temp + 1) / 2 << endl;
      return 0;
    }
    temp = (long long)sqrt(n * 2 - 1);
    if ((temp * temp + 1) / 2 == n && (temp & 1)) {
      cout << temp << " " << (temp * temp - 1) / 2 << endl;
      return 0;
    }
    for (temp = 2; n / temp; temp++) {
      if (n % temp == 0) {
        if ((n / temp) & 1) {
          long long m = n / temp;
          cout << ((m * m - 1) / 2) * temp << " " << ((m * m + 1) / 2) * temp
               << endl;
          return 0;
        }
        long long tn = n / temp;
        long long tem = (long long)sqrt(tn * 2 + 1);
        if ((tem * tem - 1) / 2 == tn && (tem & 1)) {
          cout << tem * temp << " " << ((tem * tem + 1) / 2) * temp << endl;
          return 0;
        }
        tem = (long long)sqrt(tn * 2 - 1);
        if ((tem * tem + 1) / 2 == tn && (tem & 1)) {
          cout << tem * temp << " " << ((tem * tem - 1) / 2) * temp << endl;
          return 0;
        }
      }
    }
  }
  return 0;
}
