#include <bits/stdc++.h>
using namespace std;
int sv[4001];
int w[3];
int get(int r) {
  if (!r) return 0;
  int &x = sv[r];
  if (x != -1) return x;
  x = -1e9;
  for (int i = 0; i < 3; ++i) {
    if (r - w[i] >= 0) x = max(x, get(r - w[i]) + 1);
  }
  return x;
}
int hasZ(int a) {
  stringstream ss;
  ss << a;
  string b = ss.str();
  for (int i = 0; i < b.size(); ++i) {
    if (b[i] == '0') return 1;
  }
  return 0;
}
string plan(int t) {
  int x = t / 60, y = t % 60;
  char s[10];
  sprintf(s, "%.2d:%.2d", x, y);
  string a = s, b = s;
  reverse(a.begin(), a.end());
  if (a != b) return "";
  return a;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i == j) continue;
      for (int k = 0; k < n; ++k) {
        if (k == i || k == j) continue;
        if (a[k] == a[i] + a[j]) {
          cout << k + 1 << " " << i + 1 << " " << j + 1 << endl;
          return 0;
        }
      }
    }
  }
  cout << -1 << endl;
  return 0;
}
