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