#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  unordered_map<int, int> mp;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]] = i;
  }
  int ans = -1, a, b, c;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j && mp.find(arr[i] + arr[j]) != mp.end()) {
        a = mp[arr[i] + arr[j]] + 1;
        b = i + 1;
        c = j + 1;
        ans = 0;
        break;
      }
    }
  }
  if (ans == -1)
    cout << ans;
  else {
    cout << a << " " << b << " " << c;
  }
  return 0;
}
