#include <bits/stdc++.h>
using namespace std;
struct il {
  int v;
  int p;
};
bool cmp(il a, il b) { return (a.v < b.v); }
int main(void) {
  int n;
  cin >> n;
  il* w = new il[n];
  for (int i = 0; i < n; i++) {
    cin >> w[i].v;
    w[i].p = i + 1;
  }
  sort(w, w + n, cmp);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int s = w[i].v + w[j].v;
      for (int k = j + 1; k < n; k++) {
        if (w[k].v == s) {
          cout << w[k].p << " " << w[i].p << " " << w[j].p;
          return 0;
        }
      }
    }
  }
  cout << "-1";
  return 0;
}
