You are given an integer m, and a list of n distinct integers between 0 and m - 1.

You would like to construct a sequence satisfying the properties:

  * Each element is an integer between 0 and m - 1, inclusive. 
  * All prefix products of the sequence modulo m are distinct. 
  * No prefix product modulo m appears as an element of the input list. 
  * The length of the sequence is maximized. 



Construct any sequence satisfying the properties above.

Input

The first line of input contains two integers n and m (0 ≤ n < m ≤ 200 000) — the number of forbidden prefix products and the modulus.

If n is non-zero, the next line of input contains n distinct integers between 0 and m - 1, the forbidden prefix products. If n is zero, this line doesn't exist.

Output

On the first line, print the number k, denoting the length of your sequence.

On the second line, print k space separated integers, denoting your sequence.

Examples

Input

0 5


Output

5
1 2 4 3 0


Input

3 10
2 9 1


Output

6
3 9 2 9 8 0

Note

For the first case, the prefix products of this sequence modulo m are [1, 2, 3, 4, 0].

For the second case, the prefix products of this sequence modulo m are [3, 7, 4, 6, 8, 0].
#include <bits/stdc++.h>
using namespace std;
long long algorithm___(long long p, long long k, long long c, int z) {
  k = (k % p + p) % p;
  long long k1, k2, q1, q2, dk, dq, m;
  k1 = p;
  k2 = k;
  q1 = 0;
  q2 = 1;
  while (k2 > c) {
    dq = (k1 - 1) / k2 * q2 - q1;
    dk = k1 - (k1 - 1) / k2 * k2;
    if (k2 % dk <= c) {
      m = (k2 - c - 1) / dk + 1;
      q2 = q2 + m * dq;
      k2 = k2 - m * dk;
    } else {
      m = k2 / dk;
      q2 = q2 + m * dq;
      k2 = k2 - m * dk;
    }
    q1 = q2 - dq;
    k1 = k2 + dk;
  }
  if (z == 0) {
    return k1;
  }
  if (z == 1) {
    if (q1 == 0) {
      return 1;
    }
    return q1;
  }
  return q2;
}
long long GCD(long long a, long long b) {
  return algorithm___(fabs(a), fabs(b), 0, 0);
}
long long inv(long long k, long long p) { return algorithm___(p, k, 0, 1); }
long long minq(long long p, long long k, long long c) {
  return algorithm___(p, k, c, 2);
}
int main() {
  long long n, m;
  cin >> n >> m;
  bool u[m];
  int t;
  for (int i = 0; i < m; ++i) {
    u[i] = true;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &t);
    u[t] = false;
  }
  long long nbad[m + 1];
  for (int i = 0; i <= m; ++i) {
    nbad[i] = 0;
  }
  for (int i = 0; i <= m; ++i) {
    if (!u[i]) {
      nbad[GCD(m, i)]++;
    }
  }
  long long p[1000], d[1000], lp = 0;
  long long m_ = m;
  for (int i = 2; i <= m; ++i) {
    if (m_ % i == 0) {
      p[lp] = i;
      d[lp] = 0;
      lp++;
      while (m_ % i == 0) {
        d[lp - 1]++;
        m_ /= i;
      }
    }
  }
  pair<long long, long long> goodx[m];
  int lg = 0;
  for (int i = 0; i < m; ++i) {
    if (u[i]) {
      goodx[lg].first = GCD(m, i);
      goodx[lg].second = i;
      lg++;
    }
  }
  sort(goodx, goodx + lg);
  long long maxn[m + 1], maxi[m + 1];
  for (int i = 0; i <= m; ++i) {
    maxn[i] = 0;
    maxi[i] = -1;
  }
  for (int i = 1; i <= m; ++i) {
    if (m % i == 0) {
      for (int j = 0; j < lp; ++j) {
        if (i % p[j] == 0) {
          if (maxn[i] < maxn[i / p[j]]) {
            maxn[i] = maxn[i / p[j]];
            maxi[i] = i / p[j];
          }
        }
      }
      long long d = m / i;
      long long phi = d;
      for (int j = 0; j < lp; ++j) {
        if (d % p[j] == 0) {
          phi *= (p[j] - 1);
          phi /= p[j];
        }
      }
      maxn[i] += phi - nbad[i];
    }
  }
  int i = lg - 1;
  int j = m;
  long long X[m], lX = 0;
  while (j != -1) {
    while (i >= 0 && goodx[i].first >= j) {
      if (goodx[i].first == j) {
        X[lX++] = goodx[i].second;
      }
      i--;
    }
    j = maxi[j];
  }
  long long Y = 1, B;
  cout << lX << endl;
  for (int i = lX - 1; i >= 0; --i) {
    if (i == lX - 1) {
      B = X[i];
    } else {
      long long D = GCD(m, X[i + 1]);
      B = (inv(X[i + 1] / D, m / D) * X[i] / D) % (m / D);
    }
    Y = (Y * B) % m;
    printf("%lld\n", B);
  }
  return 0;
}
