#include <bits/stdc++.h>
int main() {
  int a, b, c, d, e, f, g, h, i, j, x, y, z;
  int m[1001];
  scanf("%d", &a);
  for (x = 1; x <= a; x = x + 1) {
    scanf("%d", &m[x]);
  }
  for (x = 1; x <= a - 2; x = x + 1) {
    for (y = x + 1; y <= a - 1; y = y + 1) {
      for (z = y + 1; z <= a; z = z + 1) {
        if (m[x] + m[y] == m[z]) {
          printf("%d %d %d", z, y, x);
          return 0;
        } else if (m[y] == m[x] + m[z]) {
          printf("%d %d %d", y, x, z);
          return 0;
        } else if (m[x] == m[y] + m[z]) {
          printf("%d %d %d", x, y, z);
          return 0;
        }
      }
    }
  }
  printf("-1");
  return 0;
}
