#include <bits/stdc++.h>
const long double eps = 1e-9;
using namespace std;
int n;
long double dist(pair<long double, long double> a,
                 pair<long double, long double> b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
int used[10000];
vector<int> g[10000];
bool bfs(int s) {
  used[s] = 1;
  queue<int> q;
  q.push(s);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < (int)g[v].size(); i++) {
      int u = g[v][i];
      if (used[u] == -1) {
        used[u] = (used[v] % 2) + 1;
        q.push(u);
      } else {
        if (used[u] == used[v]) return false;
      }
    }
  }
  return true;
}
bool ok(long double mid, vector<pair<long double, long double> > a) {
  for (int i = 0; i < (int)10000; i++) g[i].clear();
  for (int i = 0; i < (int)a.size(); i++)
    for (int j = i + 1; j < a.size(); j++) {
      if (dist(a[i], a[j]) + eps < 2 * mid)
        g[i].push_back(j), g[j].push_back(i);
    }
  for (int i = 0; i < (int)a.size(); i++) used[i] = -1;
  for (int i = 0; i < (int)a.size(); i++) {
    if (used[i] == -1)
      if (!bfs(i)) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> d(n);
  for (int i = 0; i < (int)n; i++) cin >> d[i];
  for (int i = 0; i < (int)n; i++)
    for (int j = 0; j < (int)n; j++)
      for (int k = 0; k < (int)n; k++)
        if (k != j && d[i] == (d[j] + d[k]))
          cout << i + 1 << " " << j + 1 << " " << k + 1 << endl, exit(0);
  puts("-1");
}
