#include <bits/stdc++.h>
using namespace std;
bool isSame(vector<int>& v) {
  for (int i = 0; i < v.size() - 1; i++) {
    if (v[i] != v[i + 1]) {
      return false;
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int n1;
    cin >> n1;
    v.push_back(n1);
  }
  if (n == 1) {
    cout << -1 << endl;
  }
  if (n == 2) {
    sort(v.begin(), v.end());
    if (v[0] == v[1]) {
      cout << 1 << endl;
      cout << v[0] << endl;
    }
    if (v[0] != v[1]) {
      int diff = v[1] - v[0];
      if (diff % 2 == 0) {
        long long int num1 = v[0] - diff;
        long long int num2 = v[0] + diff / 2;
        long long int num3 = v[1] + diff;
        cout << 3 << endl;
        cout << num1 << " " << num2 << " " << num3 << endl;
      }
      if (diff & 1) {
        long long int num1 = v[0] - diff;
        long long int num3 = v[1] + diff;
        cout << 2 << endl;
        cout << num1 << " " << num3 << endl;
      }
    }
  }
  if (n >= 3) {
    sort(v.begin(), v.end());
    unordered_map<int, int> h;
    int i = 0;
    for (; i < v.size() - 1; i++) {
      int diff = v[i + 1] - v[i];
      if (diff == 0) {
        break;
      }
      if (diff != 0) {
        if (h.count(diff)) {
          h[diff] = h[diff] + 1;
        } else {
          h[diff] = 1;
        }
      }
    }
    if (i < v.size() - 1) {
      if (isSame(v)) {
        cout << 1 << endl;
        cout << v[0] << endl;
      }
      if (!isSame(v)) {
        cout << 0 << endl;
      }
    }
    if (i >= v.size() - 1) {
      if (h.size() == 1) {
        cout << 2 << endl;
        int diff = v[1] - v[0];
        long long int num1 = v[0] - diff;
        long long int num2 = v[v.size() - 1] + diff;
        cout << num1 << " " << num2 << endl;
      }
      if (h.size() == 2) {
        int diff = v[1] - v[0];
        if (h[diff] == 1 or h[diff] == n - 2) {
          int d1 = diff;
          int d2 = 0;
          for (auto el : h) {
            if (el.first != d1) {
              d2 = el.first;
            }
          }
          if (d2 == 2 * d1 or d1 == 2 * d2) {
            if (d2 == 2 * d1 and h[d2] == 1) {
              int num1 = 0;
              for (int i = 0; i < v.size() - 1; i++) {
                int dif = v[i + 1] - v[i];
                if (dif == d2) {
                  num1 = v[i] + dif / 2;
                  break;
                }
              }
              cout << 1 << endl;
              cout << num1 << endl;
              return 0;
            }
            if (d1 == 2 * d2 and h[d1] == 1) {
              int num1 = 0;
              for (int i = 0; i < v.size() - 1; i++) {
                int dif = v[i + 1] - v[i];
                if (dif == d1) {
                  num1 = v[i] + dif / 2;
                  break;
                }
              }
              cout << 1 << endl;
              cout << num1 << endl;
              return 0;
            } else {
              cout << 0 << endl;
            }
          } else {
            cout << 0 << endl;
          }
        } else {
          cout << 0 << endl;
        }
      } else if (h.size() > 2) {
        cout << 0 << endl;
      }
    }
  }
  return 0;
}
