#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (j != i) {
        int res = arr[i] + arr[j];
        for (int k = 0; k < n; k++) {
          if (arr[k] == res && k != i && k != j) {
            cout << k + 1 << " " << j + 1 << " " << i + 1;
            return 0;
          }
        }
      }
    }
  }
  cout << -1;
  return 0;
}
