#include <bits/stdc++.h>
int main(void) {
  int n;
  scanf("%i", &n);
  int a[n];
  for (int i = 0; i < n; i++) scanf("%i", &a[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      for (int c = 0; c < n; c++) {
        if (c == i || c == j || i == j) continue;
        if (a[i] == (a[j] + a[c])) {
          printf("%i %i %i\n", i + 1, j + 1, c + 1);
          return 0;
        }
      }
  printf("-1\n");
  return 0;
}
