Everybody seems to think that the Martians are green, but it turns out they are metallic pink and fat. Ajs has two bags of distinct nonnegative integers. The bags are disjoint, and the union of the sets of numbers in the bags is \{0,1,…,M-1\}, for some positive integer M. Ajs draws a number from the first bag and a number from the second bag, and then sums them modulo M.

What are the residues modulo M that Ajs cannot obtain with this action?

Input

The first line contains two positive integer N (1 ≤ N ≤ 200 000) and M (N+1 ≤ M ≤ 10^{9}), denoting the number of the elements in the first bag and the modulus, respectively.

The second line contains N nonnegative integers a_1,a_2,…,a_N (0 ≤ a_1<a_2< …< a_N<M), the contents of the first bag.

Output

In the first line, output the cardinality K of the set of residues modulo M which Ajs cannot obtain.

In the second line of the output, print K space-separated integers greater or equal than zero and less than M, which represent the residues Ajs cannot obtain. The outputs should be sorted in increasing order of magnitude. If K=0, do not output the second line.

Examples

Input

2 5
3 4


Output

1
2


Input

4 1000000000
5 25 125 625


Output

0


Input

2 4
1 3


Output

2
0 2

Note

In the first sample, the first bag and the second bag contain \{3,4\} and \{0,1,2\}, respectively. Ajs can obtain every residue modulo 5 except the residue 2:  4+1 ≡ 0,   4+2 ≡ 1,   3+0 ≡ 3,   3+1 ≡ 4  modulo 5. One can check that there is no choice of elements from the first and the second bag which sum to 2 modulo 5.

In the second sample, the contents of the first bag are \{5,25,125,625\}, while the second bag contains all other nonnegative integers with at most 9 decimal digits. Every residue modulo 1 000 000 000 can be obtained as a sum of an element in the first bag and an element in the second bag.
#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
string print_iterable(T1 begin_iter, T2 end_iter, int counter) {
  bool done_something = false;
  stringstream res;
  res << "[";
  for (; begin_iter != end_iter and counter; ++begin_iter) {
    done_something = true;
    counter--;
    res << *begin_iter << ", ";
  }
  string str = res.str();
  if (done_something) {
    str.pop_back();
    str.pop_back();
  }
  str += "]";
  return str;
}
vector<int> SortIndex(int size, std::function<bool(int, int)> compare) {
  vector<int> ord(size);
  for (int i = 0; i < size; i++) ord[i] = i;
  sort(ord.begin(), ord.end(), compare);
  return ord;
}
template <typename T>
bool MinPlace(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool MaxPlace(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename Container>
int SZ(const Container& S) {
  return S.size();
}
template <typename S, typename T>
ostream& operator<<(ostream& out, const pair<S, T>& p) {
  out << "{" << p.first << ", " << p.second << "}";
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "[";
  for (int i = 0; i < (int)v.size(); i++) {
    out << v[i];
    if (i != (int)v.size() - 1) out << ", ";
  }
  out << "]";
  return out;
}
const int MAXN = 250000;
long long invpot1[MAXN], invpot2[MAXN];
vector<long long> hash_string(long long mod, long long B,
                              const vector<int>& S) {
  int N = S.size();
  vector<long long> res(N + 1, 0);
  long long pot = 1;
  for (int i = 0; i < N; i++) {
    res[i + 1] = (res[i] + S[i] * pot) % mod;
    pot = (pot * B) % mod;
  }
  return res;
}
long long get_range(int a, int b, const vector<long long>& hh,
                    const long long mod, long long* invarr) {
  long long res = hh[b + 1] - hh[a];
  res = (invarr[a] * res) % mod;
  if (res < 0) res += mod;
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, M;
  cin >> N >> M;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  vector<int> b(N);
  for (int i = 1; i < N; i++) {
    b[i - 1] = a[i] - a[i - 1];
  }
  b[N - 1] = (a[0] - a[N - 1] + M);
  vector<int> c = b;
  reverse(c.begin(), c.end());
  const long long MOD = 1104982751;
  const long long B = 432561;
  const long long INVB = 1057777903;
  const long long MOD2 = 982419349;
  const long long B2 = 414341;
  const long long INVB2 = 952838246;
  invpot1[0] = 1;
  invpot2[0] = 1;
  for (int i = 0; i < MAXN - 1; i++) {
    invpot1[i + 1] = (invpot1[i] * INVB) % MOD;
    invpot2[i + 1] = (invpot2[i] * INVB2) % MOD2;
  }
  auto hb = hash_string(MOD, B, b);
  auto hc = hash_string(MOD, B, c);
  auto hb2 = hash_string(MOD2, B2, b);
  auto hc2 = hash_string(MOD2, B2, c);
  vector<int> ans;
  for (int i = 0; i < N; i++) {
    if (get_range(0, N - 1 - i, hb, MOD, invpot1) ==
            get_range(i, N - 1, hc, MOD, invpot1) and
        get_range(N - i, N - 1, hb, MOD, invpot1) ==
            get_range(0, i - 1, hc, MOD, invpot1) and
        get_range(0, N - 1 - i, hb2, MOD2, invpot2) ==
            get_range(i, N - 1, hc2, MOD2, invpot2) and
        get_range(N - i, N - 1, hb2, MOD2, invpot2) ==
            get_range(0, i - 1, hc2, MOD2, invpot2)) {
      ans.push_back((a[0] + a[(N - i) % N]) % M);
    }
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << "\n";
  if (!ans.empty()) {
    for (int x : ans) cout << x << " ";
    cout << "\n";
  }
}
