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