#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  int n, x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  vector<pair<pair<int, int>, int>> v;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    for (int j = 1; j < n; j++) {
      v.push_back(make_pair(make_pair(a[i] + a[j], i + 1), j + 1));
    }
  }
  int indx = 1;
  for (int i = 0; i < v.size(); i++) {
    auto it = find(a.begin(), a.end(), v[i].first.first);
    if (it != a.end()) {
      for (int s = 0; s < n; s++) {
        if (a[s] == *it) {
          break;
        } else {
          indx++;
        }
      }
      ans.push_back(indx);
      ans.push_back(v[i].first.second);
      ans.push_back(v[i].second);
      for (int k = 0; k < 3; k++) {
        cout << ans[k] << " ";
      }
      cout << endl;
      return 0;
    }
  }
  cout << "-1" << endl;
  return 0;
}
