#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
ll mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  if (n == 1) {
    cout << -1;
    return 0;
  }
  if (n == 2 && arr[0] != arr[1]) {
    vector<int> ans;
    if ((arr[1] - arr[0]) % 2 == 0) {
      ans.push_back((arr[0] + arr[1]) / 2);
    }
    ans.push_back(arr[0] - (arr[1] - arr[0]));
    ans.push_back(arr[1] + arr[1] - arr[0]);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    return 0;
  }
  sort(arr.begin(), arr.end());
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] == arr[0]) count++;
  }
  if (count == n) {
    cout << 1 << endl;
    cout << arr[0];
    return 0;
  }
  count = 0;
  int count1 = 0;
  ;
  int diff, idx, diff1, idx1;
  set<int> ans;
  for (int i = 0; i < n - 1; i++) {
    if (arr[i + 1] - arr[i] == arr[1] - arr[0])
      count++;
    else {
      diff = arr[i + 1] - arr[i];
      idx = i;
    }
    if (arr[i + 1] - arr[i] == (arr[2] - arr[1])) {
      count1++;
    } else {
      diff1 = arr[i + 1] - arr[i];
      idx1 = i;
    }
  }
  if (count == n - 1) {
    cout << 2 << endl;
    cout << min(2 * arr[0] - arr[1], arr[1] - arr[0] + arr[n - 1]) << " "
         << max(2 * arr[0] - arr[1], arr[1] - arr[0] + arr[n - 1]);
    return 0;
  }
  if (count == n - 2) {
    if (diff == 2 * (arr[1] - arr[0])) {
      ans.insert(arr[idx] + arr[1] - arr[0]);
    }
  }
  if (count1 == n - 2) {
    if (diff1 == 2 * (arr[2] - arr[1])) {
      ans.insert(arr[idx1] + arr[2] - arr[1]);
    }
  }
  cout << ans.size() << endl;
  while (!ans.empty()) {
    cout << *(ans.begin()) << " ";
    ans.erase(ans.begin());
  }
}
