#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  bool flag = true;
  for (int i = 0; i < n && flag; i++) {
    for (int j = i + 1; j < n && flag; j++) {
      for (int z = j + 1; z < n && flag; z++) {
        if (arr[i] == arr[j] + arr[z]) {
          cout << i + 1 << " " << j + 1 << " " << z + 1;
          flag = false;
        } else if (arr[j] == arr[i] + arr[z]) {
          cout << j + 1 << " " << i + 1 << " " << z + 1;
          flag = false;
        } else if (arr[z] == arr[i] + arr[j]) {
          cout << z + 1 << " " << i + 1 << " " << j + 1;
          flag = false;
        }
      }
    }
  }
  if (flag) cout << -1;
}
