#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, lim, x, tmp, j;
  bool flag = 0;
  scanf("%lld", &n);
  if (n == 1) {
    printf("-1\n");
    return 0;
  }
  lim = sqrt(n + 0.5);
  for (int i = 2; i <= lim; i++) {
    if (n % i == 0) {
      j = n / i;
      flag = 1;
      if ((i * i - 1) % 2 == 0) {
        printf("%lld %lld\n", 1LL * (i * i - 1) / 2 * (n / i),
               1LL * (i * i + 1) / 2 * (n / i));
        return 0;
      } else if ((j * j - 1) % 2 == 0) {
        printf("%lld %lld\n", 1LL * (j * j - 1) / 2 * (n / j),
               1LL * (j * j + 1) / 2 * (n / j));
        return 0;
      }
    }
  }
  if (!flag) {
    if ((n * n - 1) % 2 == 0) {
      printf("%lld %lld\n", (n * n - 1) / 2, (n * n + 1) / 2);
      return 0;
    }
  }
  x = 2 * n;
  lim = sqrt(x + 0.5);
  flag = 0;
  for (int i = 2; i <= lim; i++) {
    if (x % i == 0) {
      tmp = sqrt(x / i + 1 + 0.5);
      if (tmp * tmp == (x / i + 1)) {
        printf("%lld %lld\n", tmp * i, (tmp * tmp + 1) / 2 * i);
        return 0;
      }
      j = x / i;
      tmp = sqrt(x / j + 1 + 0.5);
      if (tmp * tmp == (x / j + 1)) {
        printf("%lld %lld\n", tmp * j, (tmp * tmp + 1) / 2 * j);
        return 0;
      }
    }
  }
  if (!flag) {
    tmp = sqrt(x + 1 + 0.5);
    if (tmp * tmp == (x + 1)) {
      printf("%lld %lld\n", tmp, (tmp * tmp + 1) / 2);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
