#include <bits/stdc++.h>
using namespace std;
int i, i0, n, m, a[100005];
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long rd(long long l, long long r) {
  unsigned long long ans = rng();
  return (ans % (r - l + 1)) + l;
}
map<int, int> mp, mp0;
vector<int> v;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (!mp.count(a[i]))
      mp[a[i]] = i;
    else if (!mp0.count(a[i]))
      mp0[a[i]] = i;
  }
  for (auto x : mp)
    if (!mp0.count(x.first)) mp0[x.first] = x.second;
  for (auto x : mp) v.push_back(x.first);
  if (v.size() == 1) {
    printf("-1\n");
    return 0;
  }
  while (1) {
    if (clock() > 1000) break;
    int x, y, xx, yy;
    bool f, ff;
    x = rd(1, v.size());
    y = rd(1, v.size());
    while (x == y) y = rd(1, v.size());
    xx = mp[v[x - 1]], yy = mp[v[y - 1]];
    swap(a[xx], a[yy]);
    f = 1, ff = 1;
    for (int i = 2; i <= n; i++) {
      if (a[i] < a[i - 1])
        f = 0;
      else if (a[i] > a[i - 1])
        ff = 0;
      if (f + ff == 0) break;
    }
    swap(a[xx], a[yy]);
    if (f + ff == 0) {
      printf("%d %d\n", xx, yy);
      return 0;
    }
    xx = mp[v[x - 1]], yy = mp0[v[y - 1]];
    swap(a[xx], a[yy]);
    f = 1, ff = 1;
    for (int i = 2; i <= n; i++) {
      if (a[i] < a[i - 1])
        f = 0;
      else if (a[i] > a[i - 1])
        ff = 0;
      if (f + ff == 0) break;
    }
    swap(a[xx], a[yy]);
    if (f + ff == 0) {
      printf("%d %d\n", xx, yy);
      return 0;
    }
    xx = mp0[v[x - 1]], yy = mp[v[y - 1]];
    swap(a[xx], a[yy]);
    f = 1, ff = 1;
    for (int i = 2; i <= n; i++) {
      if (a[i] < a[i - 1])
        f = 0;
      else if (a[i] > a[i - 1])
        ff = 0;
      if (f + ff == 0) break;
    }
    swap(a[xx], a[yy]);
    if (f + ff == 0) {
      printf("%d %d\n", xx, yy);
      return 0;
    }
    xx = mp0[v[x - 1]], yy = mp0[v[y - 1]];
    swap(a[xx], a[yy]);
    f = 1, ff = 1;
    for (int i = 2; i <= n; i++) {
      if (a[i] < a[i - 1])
        f = 0;
      else if (a[i] > a[i - 1])
        ff = 0;
      if (f + ff == 0) break;
    }
    swap(a[xx], a[yy]);
    if (f + ff == 0) {
      printf("%d %d\n", xx, yy);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
