#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using str = string;
using unll = unsigned long long;
int max_index(vector<int> vi1) {
  int x = (max_element(((vi1).begin()), ((vi1).end()))) - vi1.begin();
  return x;
}
int min_index(vector<int> vi1) {
  int x = (min_element(((vi1).begin()), ((vi1).end()))) - vi1.begin();
  return x;
}
int main() {
  int n;
  cin >> n;
  vector<int> NN(n), nn(n);
  for (int i = 0; i < n; ++i) {
    cin >> NN[i];
  }
  nn = NN;
  sort(((nn).begin()), ((nn).end()));
  for (int k = 0; k < n; ++k) {
    for (int j = k + 1; j < n; ++j) {
      for (int i = k + 2; i < n; ++i) {
        if (nn[k] + nn[j] == nn[i]) {
          int ii = -1, jj = -1, kk = -1;
          for (int p = 0; p < n; ++p) {
            if (NN[p] == nn[k] and kk < 0) {
              kk = p;
              continue;
            }
            if (NN[p] == nn[j] and jj < 0) {
              jj = p;
              continue;
            }
            if (NN[p] == nn[i] and ii < 0) {
              ii = p;
              continue;
            }
          }
          cout << ii + 1 << ' ' << jj + 1 << ' ' << kk + 1;
          return 0;
        }
      }
    }
  }
  cout << -1 << '\n';
  return 0;
}
