#include <bits/stdc++.h>
const unsigned long long inf = 1LL << 61;
const double eps = 1e-5;
using namespace std;
struct node {
  int v;
  int id;
} a[10000 + 10];
bool cmp(node x, node y) { return x.v < y.v; }
int main() {
  int n;
  while (cin >> n) {
    int mark = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i].v;
      a[i].id = i;
    }
    sort(a + 1, a + 1 + n, cmp);
    for (int i = 1; i <= n; i++) {
      if (mark) break;
      for (int j = i + 1; j <= n; j++) {
        if (mark) break;
        for (int k = j + 1; k <= n; k++) {
          if (a[i].v + a[j].v == a[k].v) {
            mark = 1;
            cout << a[k].id << " " << a[j].id << " " << a[i].id << endl;
            break;
          }
        }
      }
    }
    if (!mark) puts("-1");
  }
  return 0;
}
