#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long INF = 1e18;
const long long NEG_INF = -1 * (1e18);
using namespace std;
void usaco(string prob) {
  freopen((prob + ".in").c_str(), "r", stdin);
  freopen((prob + ".out").c_str(), "w", stdout);
}
bool prime(int n) {
  if (n < 2) return false;
  for (int x = 2; x * x <= n; x++) {
    if (n % x == 0) return false;
  }
  return true;
}
vector<int> getFactors(int n) {
  vector<int> f;
  for (int x = 2; x * x <= n; x++) {
    while (n % x == 0) {
      f.push_back(x);
      n /= x;
    }
  }
  if (n > 1) f.push_back(n);
  return f;
}
bool isSquare(long long x) {
  long long g = sqrt(x);
  return (g * g == x);
}
void solve() {
  long long n, x, y, a, b;
  cin >> n;
  for (long long f = 1; f * f <= n; f++) {
    if (n % f == 0) {
      if (f % 2 != (n / f) % 2) {
        continue;
      }
      x = (f + n / f) / 2;
      y = (n / f - f) / 2;
      if (x * x - y * y == n) {
        a = x * x + y * y;
        b = 2 * x * y;
        if (a > 0 && b > 0) {
          cout << a << " " << b << "\n";
          return;
        }
      }
    }
  }
  if (!(n % 2)) {
    long long k = n / 2;
    for (x = 1; x * x <= k; x++) {
      if (k % x == 0) {
        y = k / x;
        a = abs(x * x - y * y);
        b = x * x + y * y;
        if (a > 0 && b > 0) {
          cout << a << " " << b << "\n";
          return;
        }
      }
    }
  }
  for (x = 1; x * x <= n; x++) {
    y = n - x * x;
    if (isSquare(n)) {
      a = 2 * x * y;
      b = abs(x * x - y * y);
      if (a > 0 && b > 0) {
        cout << a << " " << b << "\n";
        return;
      }
    }
  }
  cout << "-1\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long TC = 1;
  for (long long tt = 1; tt <= (long long)(TC); ++tt) {
    solve();
  }
  return 0;
}
