#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<int, int> > vt;
bool cmp(pair<int, int> x, pair<int, int> y) {
  return (x.first < y.first || (x.first == y.first && x.second < y.second));
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int u;
    cin >> u;
    vt.push_back(make_pair(u, i));
  }
  sort(vt.begin(), vt.end(), cmp);
  for (int i = 0; i < (int)vt.size() - 2; i++)
    for (int j = i + 1; j < (int)vt.size() - 1; j++) {
      int k = upper_bound(
                  vt.begin(), vt.end(),
                  pair<int, int>(vt[i].first + vt[j].first - 1, 1000000000)) -
              vt.begin();
      if (vt[k].first == (vt[i].first + vt[j].first)) {
        cout << vt[k].second << " " << vt[i].second << " " << vt[j].second;
        return 0;
      }
    }
  cout << "-1";
  return 0;
}
