#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sum = 0;
  int lengthj = 0;
  int lengthk = 0;
  int lengthx = 0;
  bool bola = false;
  int *lengthes = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> lengthes[i];
  }
  for (int j = 0; j < n; j++) {
    if (bola == true) {
      break;
    }
    sum = 0;
    for (int k = 0; k < n; k++) {
      if (bola == true) {
        break;
      }
      if (k == j) {
        continue;
      }
      for (int x = 0; x < n; x++) {
        if (bola == true) {
          break;
        }
        if (k == x || x == j) {
          continue;
        }
        sum = lengthes[k] + lengthes[x];
        if (sum == lengthes[j]) {
          lengthj = j + 1;
          lengthk = k + 1;
          lengthx = x + 1;
          bola = true;
        }
      }
    }
  }
  if (bola == true) {
    cout << lengthj << " ";
    cout << lengthx << " ";
    cout << lengthk << endl;
  }
  if (lengthj == 0 && lengthk == 0 && lengthx == 0) {
    cout << -1 << endl;
  }
  return 0;
}
