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