#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, x = 0, y = 0, pos, pos1, temp;
  scanf("%d", &n);
  int a[n], b[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  if (n == 1 || n == 2) {
    printf("-1\n");
    return 0;
  }
  sort(b, b + n);
  for (i = 0; i < n; i++)
    if (a[i] != b[i]) {
      x = 1;
      break;
    }
  for (i = n - 1; i >= 0; i--)
    if (a[i] != b[n - i - 1]) {
      y = 1;
      break;
    }
  if (x == 0 && y == 0) {
    printf("-1\n");
    return 0;
  }
  x = 0;
  y = 0;
  for (i = 0; i < n; i++) {
    if (a[i] > a[i + 1]) {
      if (a[i + 1] >= a[i + 2]) {
        pos = i + 1;
        pos1 = i + 2;
        break;
      } else if (a[i + 1] < a[i + 2]) {
        if (a[i] != a[i + 2]) {
          pos = i + 1;
          pos1 = i + 3;
          break;
        } else {
          if (a[i + 1] >= a[i + 3]) {
            pos = i + 1;
            pos1 = i + 2;
          } else {
            pos = i + 2;
            pos1 = i + 3;
          }
          break;
        }
      }
    } else if (a[i] < a[i + 1]) {
      if (a[i + 1] <= a[i + 2]) {
        pos = i + 1;
        pos1 = i + 2;
        break;
      } else {
        if (a[i] != a[i + 2]) {
          pos = i + 1;
          pos1 = i + 3;
          break;
        } else {
          if (a[i + 1] <= a[i + 3]) {
            pos = i + 1;
            pos1 = i + 2;
          } else {
            pos = i + 2;
            pos1 = i + 3;
          }
          break;
        }
      }
    } else {
      if (a[i + 1] != a[i + 2]) {
        pos = i + 2;
        pos1 = i + 3;
        break;
      }
    }
  }
  temp = a[pos - 1];
  a[pos - 1] = a[pos1 - 1];
  a[pos1 - 1] = temp;
  for (i = 0; i < n; i++)
    if (a[i] != b[i]) {
      x = 1;
      break;
    }
  for (i = n - 1; i >= 0; i--)
    if (a[i] != b[n - i - 1]) {
      y = 1;
      break;
    }
  if (x == 0 || y == 0) {
    printf("-1\n");
    return 0;
  }
  printf("%d %d\n", pos, pos1);
  return 0;
}
