#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  bool first = false;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < n; j++) {
      for (long long int k = 0; k < n; k++) {
        if (a[i] == a[j] + a[k]) {
          if (i != j && i != k && j != i && j != k && k != i && k != j) {
            first = true;
            cout << i + 1 << " " << j + 1 << " " << k + 1;
            break;
          }
        }
      }
      if (first == true) break;
    }
    if (first == true) break;
  }
  if (first == false) cout << -1;
}
