#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> v;
  long long int elem;
  for (long long int i = 0; i < n; ++i) {
    cin >> elem;
    v.emplace_back(elem);
  }
  for (long long int i = 0; i < n; ++i) {
    for (long long int j = i + 1; j < n; ++j) {
      auto x = find(v.begin(), v.end(), v.at(i) + v.at(j));
      if (x != v.end()) {
        cout << x - v.begin() + 1 << " " << i + 1 << " " << j + 1 << "\n";
        return 0;
      }
    }
  }
  cout << "-1\n";
  return 0;
}
