#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  if (n == 1) {
    cout << -1;
    return 0;
  } else {
    for (int i = n; i > 1; --i) {
      for (int j = 2; j <= n; j++) {
        if (i * j > n && i % j == 0) {
          cout << i << " " << j;
          return 0;
        }
      }
    }
  }
  cout << -1;
  return 0;
}
