#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, c;
  cin >> n;
  vector<long long> v(n + 5), mp[4007];
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    c = v[i];
    mp[c].push_back(i + 1);
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (mp[(v[i] + v[j])].size()) {
        if (v[i] != v[j])
          cout << mp[v[i] + v[j]][0] << " " << mp[v[i]][0] << " " << mp[v[j]][0]
               << endl;
        else
          cout << mp[v[i] + v[j]][0] << " " << mp[v[i]][0] << " " << mp[v[j]][1]
               << endl;
        return 0;
      }
    }
  }
  cout << -1 << endl;
  return 0;
}
