#include <bits/stdc++.h>
const int N = 100005;
const long double pi = 3.141592653;
const long long MOD = 1000000007;
using namespace std;
int dx[9] = {1, -1, 0, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 0, 1, -1, 1, -1, 1, -1, 0};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    long long n, a, b, i, x, y;
    cin >> n;
    for (i = 1; i * i <= n; i++) {
      if (n % i == 0) {
        x = n * (n / i);
        y = n * i;
        long long c = (i + x), d = abs(x - i);
        if (c % 2 == 0 && d % 2 == 0 && d != 0) {
          cout << c / 2 << " " << d / 2;
          return 0;
        }
        c = (n / i + y);
        d = abs(n / i - y);
        if (c % 2 == 0 && d % 2 == 0 && d != 0) {
          cout << c / 2 << " " << d / 2;
          return 0;
        }
      }
    }
    cout << -1;
  }
  return 0;
}
