#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, b, c, t;
  scanf("%lld", &n);
  if (n & 1) {
    t = (n - 1) / 2;
    b = 2 * t * t + 2 * t;
    c = b + 1;
  } else {
    t = n / 2;
    b = t * t - 1;
    c = b + 2;
  }
  if (n == 1 || n == 2)
    printf("-1\n");
  else
    printf("%lld %lld\n", b, c);
  return 0;
}
