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].
import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class C {
	FastScanner in;
	PrintWriter out;

	int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	BigInteger MOD;
	
	long inverse(long x) {
		return BigInteger.valueOf(x).modInverse(MOD).longValue();
	}
	
	public void solve() throws IOException {
		int n = in.nextInt(), m = in.nextInt();
		MOD = BigInteger.valueOf(m);
		HashSet<Integer> bad = new HashSet<>();
		for (int i = 0; i < n; i++) {
			int x = in.nextInt();
			bad.add(x);
		}
		ArrayList<Integer>[] primes = new ArrayList[m + 1];
		for (int i = 0; i < primes.length; i++) {
			primes[i] = new ArrayList<>();
		}
		for (int d = 2; d <= m; d++) {
			if (primes[d].isEmpty()) {
				for (int i = 1; i * d <= m; i++) {
					primes[i * d].add(d);
				}
			}
		}
		ArrayList<Integer> modPrimes = new ArrayList<>();
		for (int i = 1; i < m; i++) {
			if (gcd(i, m) == 1) {
				modPrimes.add(i);
			}
		}
		int[] canOutput = new int[m + 1];
		for (int d = 1; d < m; d++) {
			if (!bad.contains(d)) {
				int g = gcd(m, d);
				canOutput[g]++;
			}
		}
		int[] dp = new int[m + 1];
		int[] prev = new int[m + 1];
		dp[1] = canOutput[1];
		for (int i = 2; i <= m; i++) {
			for (int prime : primes[i]) {
				if (dp[i / prime] > dp[i]) {
					dp[i] = dp[i / prime];
					prev[i] = prime;
				}
			}
			dp[i] += canOutput[i];
		}
		ArrayList<Integer> pSeq = new ArrayList<>();
		{
			int x = m;
			while (x != 1) {
				pSeq.add(prev[x]);
				x /= prev[x];
			}
		}
		Collections.reverse(pSeq);

		HashSet<Integer> was = new HashSet<>();
		ArrayList<Integer> ansM = new ArrayList<>();
		ArrayList<Integer> ansP = new ArrayList<>();
		int base = 1;
		int cur = 1;
		for (int prime : pSeq) {
			for (int x : modPrimes) {
				cur = (int) ((base * 1L * x) % m);
				if (!was.contains(cur) && !bad.contains(cur)) {
					ansM.add(x);
					ansP.add(base);
					was.add(cur);
				}
			}
			base *= prime;
		}
		if (!bad.contains(0)) {
			ansM.add(0);
			ansP.add(1);
		}
		out.println(ansM.size());
		long prevM = 1;
		long prevP = 1;
		long prod = 1;
		ArrayList<Long> prods = new ArrayList<>();
		for (int i = 0; i < ansM.size(); i++) {
			long curM = ansM.get(i);
			long curP = ansP.get(i);
			long outX = inverse(prevM) * 1L * curM * (curP / prevP) % m;
			out.print(outX + " ");
			prod = prod * outX % m;
			prods.add(prod);
			prevM = curM;
			prevP = curP;
		}
	/*	out.println();
		for (long xx : prods)
			out.print(xx + " ");*/
	}

	public void run() {
		try {
			in = new FastScanner();
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static void main(String[] arg) {
		new C().run();
	}
}