#include <bits/stdc++.h>
using namespace std;
int a[110], b[1010], c[10010];
int main() {
  int n, x = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]] = i + 1;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      for (int t = 0; t < n; t++)
        if (a[i] + a[j] == a[t]) {
          cout << t + 1 << " " << i + 1 << " " << j + 1 << endl;
          x = 1;
          i = n;
          j = n;
          break;
        }
    }
  if (x == 0) cout << -1 << endl;
  return 0;
}
