#include <bits/stdc++.h>
const int N = 100005;
const int inf = 1 << 28;
const int mod = 1e9 + 7;
const double eps = 1e-8;
using namespace std;
int n, a[N];
int main() {
  while (scanf("%d", &n) > 0) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    sort(a + 1, a + n + 1);
    int ans[5], res = 0;
    if (n == 1) {
      puts("-1");
      continue;
    } else if (n == 2) {
      int d = a[2] - a[1];
      if ((a[1] + a[2]) % 2 == 0) {
        ans[res++] = (a[1] + a[2]) / 2;
        ans[res++] = a[1] - d, ans[res++] = a[2] + d;
      } else {
        ans[res++] = a[1] - d, ans[res++] = a[2] + d;
      }
    } else if (n == 3) {
      if (a[3] + a[1] == 2 * a[2]) {
        int d = a[2] - a[1];
        ans[res++] = a[1] - d, ans[res++] = a[3] + d;
      } else {
        int d1 = a[2] - a[1], d2 = a[3] - a[2];
        if (d1 % 2 == 0 && d1 / 2 == d2)
          ans[res++] = (a[1] + a[2]) / 2;
        else if (d2 % 2 == 0 && d2 / 2 == d1)
          ans[res++] = (a[3] + a[2]) / 2;
      }
    } else {
      int d = a[2] - a[1], dd = -1, id = -1, cnt = 0, tmp = 0;
      for (int i = 3; i <= n; i++) {
        if (a[i] - a[i - 1] != d) {
          dd = a[i] - a[i - 1], id = i;
          break;
        }
      }
      if (id == -1) {
        ans[res++] = a[1] - d, ans[res++] = a[n] + d;
      } else {
        for (int i = 2; i <= n; i++) {
          if (a[i] - a[i - 1] == d)
            cnt++;
          else if (a[i] - a[i - 1] == dd)
            tmp++;
        }
        if (cnt + tmp != (n - 1))
          res = 0;
        else if (cnt == 1) {
          if (d % 2 == 0 && d / 2 == dd) ans[res++] = (a[1] + a[2]) / 2;
          ;
        } else if (tmp == 1) {
          if (dd % 2 == 0 && dd / 2 == d) ans[res++] = (a[id] + a[id - 1]) / 2;
          ;
        } else
          res = 0;
      }
    }
    if (res == 0)
      puts("0");
    else {
      sort(ans, ans + res);
      res = unique(ans, ans + res) - ans;
      printf("%d\n%d", res, ans[0]);
      for (int i = 1; i < res; i++) printf(" %d", ans[i]);
      puts("");
    }
  }
  return 0;
}
