#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, n, m, p;
  scanf("%lld", &n);
  if (n <= 2)
    printf("-1\n");
  else if (n & 1) {
    printf("%lld %lld\n", (n * n + 1) / 2, (n * n - 1) / 2);
  } else {
    printf("%lld %lld\n", n * n / 4 + 1, n * n / 4 - 1);
  }
  return 0;
}
