#include <bits/stdc++.h>
using namespace std;
template <typename T>
void Print(const vector<T> &v) {
  for (int i = 0; i + 1 < v.size(); i++) cout << v[i] << " ";
  cout << v.back() << "\n";
}
void realSolve(int a[], int n) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        for (int k = j + 1; k < n; k++) {
          if (k != i && a[i] == a[j] + a[k]) {
            cout << i + 1 << ' ' << j + 1 << ' ' << k + 1 << '\n';
            return;
          }
        }
      }
    }
  }
  cout << -1 << '\n';
}
void solve() {
  int i = 0;
  int n;
  cin >> n;
  int a[101];
  for (int i = 0; i < (int)(n); ++i) cin >> a[i];
  realSolve(a, n);
}
int main() {
  int tc = 1;
  for (int t = 1; t <= tc; t++) {
    solve();
  }
  return 0;
}
