#include <bits/stdc++.h>
using namespace std;
void show(vector<int> a) {
  int i = 0;
  while (i < a.size()) {
    cout << a[i] << " ";
    i++;
  }
  cout << endl;
}
void show(map<int, int> a) {
  for (auto i = a.begin(); i != a.end(); i++) {
    cout << i->first << " " << i->second << endl;
  }
}
bool isAp(vector<int> a) {
  int d = a[1] - a[0];
  for (int i = 1; i < a.size(); i++) {
    if (a[i] - a[i - 1] != d) return false;
  }
  return true;
}
void answer(vector<int> a) {
  sort(a.begin(), a.end());
  if (a.size() == 1) {
    cout << -1 << endl;
    return;
  }
  if (a.size() == 2) {
    vector<int> ans;
    int d = (a[1] - a[0]);
    if (d == 0) {
      cout << 1 << endl;
      cout << a[0] << endl;
      return;
    }
    ans.push_back(a[0] - d);
    ans.push_back(a[1] + d);
    if ((a[0] + a[1]) % 2 == 0) ans.push_back((a[0] + a[1]) / 2);
    sort(ans.begin(), ans.end());
    cout << ans.size() << endl;
    show(ans);
    return;
  }
  if (isAp(a)) {
    if (a[0] - (a[1] - a[0]) != a[a.size() - 1] + (a[1] - a[0])) {
      cout << 2 << endl;
      cout << a[0] - (a[1] - a[0]) << " " << a[a.size() - 1] + (a[1] - a[0])
           << endl;
      return;
    } else {
      cout << 1 << endl;
      cout << a[0] - (a[1] - a[0]) << endl;
      return;
    }
  }
  map<int, int> table;
  for (int i = 1; i < a.size(); i++) {
    table[a[i] - a[i - 1]] += 1;
  }
  if (table.size() == 2) {
    int e, b, c, d;
    auto i = table.begin();
    e = i->second;
    c = i->first;
    i++;
    b = i->second;
    d = i->first;
    if (e == 1 && b == 1) {
      if (c == 2 * d) {
        cout << 1 << endl;
        for (int i = 1; i < a.size(); i++) {
          if (a[i] - a[i - 1] == c) {
            cout << a[i] - d << endl;
            break;
          }
        }
        return;
      }
      if (d == 2 * c) {
        cout << 1 << endl;
        for (int i = 1; i < a.size(); i++) {
          if (a[i] - a[i - 1] == d) {
            cout << a[i] - c << endl;
            break;
          }
        }
        return;
      }
    } else if (e == 1) {
      if (c == 2 * d) {
        cout << 1 << endl;
        for (int i = 1; i < a.size(); i++) {
          if (a[i] - a[i - 1] == c) {
            cout << a[i] - d << endl;
            break;
          }
        }
        return;
      }
    } else if (b == 1) {
      if (d == 2 * c) {
        cout << 1 << endl;
        for (int i = 1; i < a.size(); i++) {
          if (a[i] - a[i - 1] == d) {
            cout << a[i] - c << endl;
            break;
          }
        }
        return;
      }
    }
  }
  cout << 0 << endl;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  answer(a);
}
