#include <bits/stdc++.h>
using namespace std;
pair<int, int> pre(int a[], int n, int k) {
  pair<int, int> p;
  set<int> s;
  for (int i = 0; i < n; i++) {
    if (s.find(a[i]) != s.end()) {
      p.first = i;
      p.second = k - a[i];
      for (int j = 0; j < i; j++) {
        if (a[j] == p.second) {
          p.second = j;
          break;
        }
      }
      return p;
    } else {
      s.insert(k - a[i]);
    }
  }
  p.first = -1;
  p.second = -1;
  return p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    pair<int, int> p;
    p = pre(a, n, a[i]);
    if (p.first == -1) {
    } else {
      cout << i + 1 << " " << p.first + 1 << " " << p.second + 1 << "\n";
      return 0;
    }
  }
  cout << "-1\n";
  return 0;
}
