#include <bits/stdc++.h>
using namespace std;
int n, a[110];
map<int, int> idx;
bool ada[10010], ok;
int main() {
  ok = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ada[a[i]] = 1;
    idx[a[i]] = i;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        if (ada[a[i] + a[j]]) {
          cout << idx[a[i] + a[j]] + 1 << " " << i + 1 << " " << j + 1 << endl;
          ok = 1;
          break;
        }
      }
    }
    if (ok) break;
  }
  if (!ok) cout << "-1" << endl;
  return 0;
}
