#include <bits/stdc++.h>
using namespace std;
long long INF = 1e12;
long long M = 1E9 + 7;
inline long long power(long long a, long long p) {
  long long res = 1, x = a;
  while (p) {
    if (p & 1) res = (res * x);
    x = (x * x);
    p >>= 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  int n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  set<long long> d;
  sort(v.begin(), v.end());
  for (long long i = 1; i < n; i++) d.insert(v[i] - v[i - 1]);
  int sz = d.size();
  if (sz > 2)
    cout << "0"
         << "\n";
  else if (sz == 0)
    cout << "-1"
         << "\n";
  else if (sz == 2) {
    map<long long, long long> cnt;
    for (long long i = 1; i < n; i++) {
      cnt[v[i] - v[i - 1]]++;
    }
    map<long long, long long>::iterator it = cnt.begin();
    pair<long long, long long> d1 = *it;
    it++;
    pair<long long, long long> d2 = *it;
    if (d1.second < d2.second) swap(d1, d2);
    if (d2.first != (2 * d1.first))
      cout << "0"
           << "\n";
    else if (d2.second > 1)
      cout << "0"
           << "\n";
    else {
      cout << "1"
           << "\n";
      for (long long i = 1; i < n; i++) {
        if ((v[i] - v[i - 1]) == d2.first) {
          cout << (v[i - 1] + d1.first) << "\n";
          break;
        }
      }
    }
  } else if (sz == 1) {
    long long d1 = *d.begin();
    set<long long> ans;
    if (n == 2) {
      if (d1 % 2 == 0) {
        ans.insert(v[0] - d1);
        ans.insert(v[0] + d1 / 2);
        ans.insert(v[1] + d1);
      } else {
        ans.insert(v[0] - d1);
        ans.insert(v[1] + d1);
      }
    } else {
      ans.insert(v[0] - d1);
      ans.insert(v[n - 1] + d1);
    }
    cout << (int)ans.size() << "\n";
    for (auto &it : ans) cout << it << " ";
  }
  return 0;
}
