#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q = 0;
  cin >> n;
  int a[n], ans[5];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 1) {
    cout << -1;
    return 0;
  }
  sort(a, a + n);
  if (n == 2) {
    int d = a[1] - a[0];
    if ((d) % 2 == 0 && d > 0) {
      ans[q++] = (a[0] + a[1]) / 2;
    }
    ans[q++] = a[1] + d;
    ans[q++] = a[0] - d;
    if (ans[0] == ans[1]) q = 1;
  } else {
    int i = 1, r = a[1] - a[0], cntr = 0, s, cnts = 0, ind;
    while (i < n) {
      if (a[i] - a[i - 1] == r)
        cntr++;
      else if (cnts == 0 || cnts != 0 && s == a[i] - a[i - 1]) {
        s = a[i] - a[i - 1];
        cnts++;
        ind = i;
      } else {
        cout << 0;
        return 0;
      }
      i++;
    }
    if (cntr == 1 && cnts == 1) {
      if (a[ind] - a[ind - 1] == 2 * r)
        ans[q++] = (a[ind] + a[ind - 1]) / 2;
      else if (r == 2 * s)
        ans[q++] = (a[1] + a[0]) / 2;
    } else if (cnts == 1) {
      if (a[ind] - a[ind - 1] == 2 * r)
        ans[q++] = (a[ind] + a[ind - 1]) / 2;
      else {
        cout << 0;
        return 0;
      }
    } else if (cntr == 1) {
      if (r == 2 * s)
        ans[q++] = (a[1] + a[0]) / 2;
      else {
        cout << 0;
        return 0;
      }
    } else if (cnts == 0) {
      ans[q++] = a[n - 1] + r;
      ans[q++] = a[0] - r;
      if (ans[0] == ans[1]) q = 1;
    } else if (cntr != 1 && cnts != 1) {
      cout << 0;
      return 0;
    }
  }
  cout << q << endl;
  sort(ans, ans + q);
  for (int i = 0; i < q; i++) {
    cout << ans[i] << " ";
  }
}
