#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[100050];
  long long b[100050];
  int f = 1;
  int f1 = 0;
  if (n <= 2) f1 = 1;
  for (int i = 0; i < n && !f1; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  for (int i = 0; i < n - 1 && !f1; i++) {
    if (a[i] == a[i + 1])
      continue;
    else {
      swap(a[i], a[i + 1]);
      int f2 = 0;
      for (int s = 0; s < n; s++) {
        if (a[s] != b[s]) {
          f = 0;
          break;
        } else if (s == n - 1)
          f2 = 1;
      }
      int j = 0;
      for (int t = n - 1; t >= 0 && !f2; t--) {
        if (a[t] != b[j]) {
          f = 0;
          break;
        } else if (t == 0)
          f = 1;
        j++;
      }
      if (f) swap(a[i], a[i + 1]);
    }
    if (!f) {
      cout << i + 1 << " " << i + 2;
      break;
    }
  }
  if (f || f1) cout << -1;
  cout << endl;
}
