#include <bits/stdc++.h>
using namespace std;
pair<int, int> solve(vector<int> a) {
  vector<int> b = a;
  vector<int> c = a;
  sort(b.begin(), b.end());
  sort(c.rbegin(), c.rend());
  map<int, vector<int> > mp;
  for (int i = 0; i < (int)(a.size()); i++) mp[a[i]].push_back(i);
  map<int, vector<int> >::iterator itr, jtr;
  for (itr = mp.begin(); itr != mp.end(); itr++) {
    for (jtr = itr, ++jtr; jtr != mp.end(); jtr++) {
      vector<int> &x = itr->second;
      vector<int> &y = jtr->second;
      for (int i = 0; i < (int)(x.size()); i++)
        for (int j = 0; j < (int)(y.size()); j++) {
          swap(a[x[i]], a[y[j]]);
          if (a != b && a != c) return make_pair(x[i], y[j]);
          swap(a[x[i]], a[y[j]]);
        }
    }
  }
  return make_pair(-1, -1);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  pair<int, int> ret = solve(a);
  if (ret.first == -1 && ret.second == -1)
    cout << -1 << endl;
  else
    cout << ret.first + 1 << " " << ret.second + 1 << endl;
  return 0;
}
