#include <bits/stdc++.h>
using namespace std;
int test(int* list, int n, int value) {
  for (int i = 0; i < n; i++)
    if (value == list[i]) return i;
  return -1;
}
int main() {
  int n;
  cin >> n;
  int* list = new int[n];
  for (int i = 0; i < n; i++) cin >> list[i];
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++)
      if (test(list, n, list[i] + list[j]) != -1) {
        cout << test(list, n, list[i] + list[j]) + 1 << " " << j + 1 << " "
             << i + 1;
        return 0;
      }
  }
  cout << -1;
  return 0;
}
