#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int a[MAX], N;
bool sorted(bool s) {
  for (int i = 1; i < N; i++)
    if (s) {
      if (a[i] > a[i + 1]) return false;
    } else {
      if (a[i] < a[i + 1]) return false;
    }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  int i, _pmin, _pmax;
  cin >> N;
  bool ret = false;
  for (i = 1; i <= N; i++) cin >> a[i];
  for (i = 2; i <= N; i++) {
    if (!ret && a[i] != a[i - 1]) {
      swap(a[i], a[i - 1]);
      if (!(sorted(true) || sorted(false))) {
        ret = true;
        _pmin = i - 1, _pmax = i;
        break;
      }
      swap(a[i], a[i - 1]);
    }
  }
  if (ret)
    cout << _pmin << " " << _pmax << endl;
  else
    cout << -1 << endl;
  return 0;
}
