#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int>> d(n);
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    pair<int, int> tmp = make_pair(t, i + 1);
    d[i] = tmp;
  }
  sort(d.begin(), d.end());
  for (int i = 0; i < n; i++) {
    int p1 = 0;
    int p2 = n - 1;
    while (p1 != p2) {
      if (i == p1) {
        p1++;
      } else if (i == p2) {
        p2--;
      } else {
        if (d[p1].first + d[p2].first == d[i].first) {
          cout << d[i].second << " " << d[p2].second << " " << d[p1].second
               << endl;
          return 0;
        } else if (d[p1].first + d[p2].first < d[i].first) {
          p1++;
        } else {
          p2--;
        }
      }
    }
  }
  cout << -1 << endl;
  return 0;
}
