#include <bits/stdc++.h>
using namespace std;
int M = 1e9 + 7;
int main() {
  int i, j, n;
  cin >> n;
  vector<int> a(n), b(1001, 0);
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]]++;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (i == j || a[i] <= a[j]) continue;
      if (a[i] - a[j] == a[j]) {
        if (b[a[j]] > 1) {
          cout << i + 1 << " ";
          int f = 2;
          for (int k = 0; k < n && f > 0; k++) {
            if (a[k] == a[j]) {
              cout << k + 1 << " ";
              f--;
            }
          }
          return 0;
        }
      } else if (b[a[i] - a[j]]) {
        cout << i + 1 << " " << j + 1 << " ";
        for (int k = 0; k < n; k++) {
          if (a[k] == a[i] - a[j]) {
            cout << k + 1;
            return 0;
          }
        }
      }
    }
  }
  cout << -1;
  return 0;
}
