#include <bits/stdc++.h>
using namespace std;
inline int ReadInt() {
  static int n, ch;
  n = 0, ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  return n;
}
unsigned long long m, n;
int main() {
  unsigned long long a, b, c, t;
  cin >> a;
  if (a == 1 || a == 2)
    puts("-1");
  else if (a == 3)
    puts("4 5");
  else if (a == 4)
    puts("3 5");
  else {
    if (a & 1) {
      b = 2 * (a / 2) * (a / 2) + a - 1;
      c = 2 * (a / 2) * (a / 2) + a;
    } else {
      b = (a / 2) * (a / 2) - 1;
      c = (a / 2) * (a / 2) + 1;
    }
    cout << b << ' ' << c << endl;
  }
  return 0;
}
