#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  vector<int>::iterator itr;
  int input;
  for (int i = 0; i < n; i++) {
    cin >> input;
    v.push_back(input);
  }
  int sum;
  bool found = false;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      sum = v[i] + v[j];
      itr = find(v.begin(), v.end(), sum);
      if (itr != v.end()) {
        cout << itr - v.begin() + 1 << " " << i + 1 << " " << j + 1;
        exit(0);
      }
    }
  }
  cout << -1;
}
