#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int q = 0; q < n; q++) cin >> arr[q];
  int x, y, z;
  int c = 0;
  for (x = 0; x < n; x++) {
    for (y = 0; y < n; y++) {
      if (y == x) continue;
      for (z = 0; z < n; z++) {
        if (z == y || z == x)
          continue;
        else {
          if (arr[x] == arr[y] + arr[z]) {
            cout << x + 1 << " " << y + 1 << " " << z + 1 << endl;
            c++;
            goto last;
          } else
            continue;
        }
      }
    }
  }
  if (c == 0) cout << -1 << endl;
last:
  return 0;
}
