#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      auto it = find(v.begin(), v.end(), v[j] + v[i]);
      if (it != v.end()) {
        cout << it - v.begin() + 1 << " " << j + 1 << " " << i + 1;
        return 0;
      }
    }
  cout << -1;
  return 0;
}
