#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 5, mod = 1000000007;
int n, a[N], b[1005];
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio();
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) b[a[i]]++;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      int s = a[i] + a[j];
      if (b[s] > 0) {
        for (int q = 0; q < n; q++)
          if (a[q] == s) {
            cout << q + 1 << " " << i + 1 << " " << j + 1;
            return 0;
          }
      }
    }
  cout << -1;
  return 0;
}
