#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
int main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (int i = 1; i * i < n; i++) {
    long long t = n - i * i, l = sqrt(t);
    if (n % i == 0) {
      if ((n / i + i) % 2 == 0 && (n / i - i) % 2 == 0) {
        long long v = (n / i + i) / 2, u = (n / i - i) / 2;
        long long m = v * v + u * u, k = 2 * v * u;
        cout << k << " " << m << endl;
        return 0;
      } else if ((n / i) % 2 == 0) {
        long long v = (n / i) / 2, u = i;
        if (v == u) continue;
        long long m = v * v + u * u, k = abs(v * v - u * u);
        cout << k << " " << m << endl;
        return 0;
      }
    } else if (l * l == t) {
      long long v = l, u = i;
      if (v == u) continue;
      long long m = abs(v * v - u * u), k = 2 * v * u;
      cout << m << " " << k << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
