#include <bits/stdc++.h>
const int N = 3e5 + 5;
using namespace std;
int arr[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int diff = arr[1] - arr[0], diff2 = 0;
  set<long long> d;
  d.insert(diff);
  map<long long, long long> mp;
  mp[diff]++;
  for (int i = 1; i < n - 1; i++) {
    if (arr[i + 1] - arr[i] != diff) diff2 = arr[i + 1] - arr[i];
    d.insert(arr[i + 1] - arr[i]);
    mp[arr[i + 1] - arr[i]]++;
  }
  int cnt = d.size();
  if (n == 1) return cout << -1, 0;
  if (cnt > 2) return cout << 0, 0;
  set<long long> ans;
  if (cnt == 1) {
    ans.insert(arr[0] - diff);
    if (n == 2) {
      int x = (arr[0] + arr[1]);
      if (x % 2 == 0) ans.insert(x / 2);
    }
    ans.insert(diff + arr[n - 1]);
  } else if (cnt == 2) {
    int x = max(diff2, diff), y = min(diff, diff2);
    if (mp[x] > 1) return cout << 0, 0;
    for (int i = 0; i < n - 1; i++) {
      if (arr[i + 1] - arr[i] == x) {
        int a = (arr[i + 1] + arr[i]) / 2;
        if (arr[i + 1] - a == y && a - arr[i] == y) {
          ans.insert(a);
          break;
        }
      }
    }
  }
  cout << ans.size() << endl;
  for (auto it : ans) cout << it << " ";
  return 0;
}
