Problem: You are given an array of n elements, you must make it a co-prime array in as few moves as possible.

In each move you can insert any positive integral number you want not greater than 109 in any place in the array.

An array is co-prime if any two adjacent numbers of it are co-prime.

In the number theory, two integers a and b are said to be co-prime if the only positive integer that divides both of them is 1.

Input

The first line contains integer n (1 ≤ n ≤ 1000) — the number of elements in the given array.

The second line contains n integers ai (1 ≤ ai ≤ 109) — the elements of the array a.

Output

Print integer k on the first line — the least number of elements needed to add to the array a to make it co-prime.

The second line should contain n + k integers aj — the elements of the array a after adding k elements to it. Note that the new array should be co-prime, so any two adjacent values should be co-prime. Also the new array should be got from the original array a by adding k elements to it.

If there are multiple answers you can print any one of them.

Example

Input

3
2 7 28


Output

1
2 7 9 28

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.*;
import java.util.*;
/**
 * @author ramilagger
 *
 */
public class Main {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public int gcd(int a, int b) {
        int temp;
        while (b != 0) {
            temp = a % b;
            a = b;
            b = temp;
        }
        return a;
    }

    public void solve() throws Exception {

        int n = nextInt();
        int a[] = nextArray(n);
        int cnt = 0;
        StringBuilder sb = new StringBuilder();
        sb.append(a[0]);
        for (int i = 1; i < n; i++) {
            if (gcd(a[i - 1], a[i]) != 1) {
                cnt++;
                for (int j = 2; ; j++) {
                    if (gcd(a[i - 1], j) == 1 && gcd(a[i], j) == 1) {
                        sb.append(" " + j + " " + a[i]);
                        break;
                    }
                }
            } else {
                sb.append(" " + a[i]);
            }
        }
        pw.println(cnt);
        pw.println(sb.toString().trim());
    }

    public void run() throws Exception {
        long start = System.currentTimeMillis();
        solve();
        if(!ONLINE_JUDGE){
            long end = System.currentTimeMillis();
            System.err.println(end - start + " ms");
        }
        pw.close();
    }

    public Main() throws Exception {

        br = (ONLINE_JUDGE) ? new BufferedReader(new InputStreamReader(System.in))
                : new BufferedReader(new FileReader("in.txt"));

        pw = (ONLINE_JUDGE) ?
                new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))
                : new PrintWriter(new BufferedWriter(new FileWriter("out.txt")));

    }

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    public String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

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

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

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

    public BigInteger nextBigInteger () throws IOException {
        return new BigInteger(next());
    }

    public String nextLine() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            return br.readLine();
        }
        StringBuilder sb = new StringBuilder(st.nextToken());
        while (st.hasMoreTokens()){
            sb.append(" " + st.nextToken());
        }
        return sb.toString();
    }

    public int[] nextArray(int n) throws IOException {
        int[] temp = new int[n];
        for (int i = 0; i < n; i++) {
            temp[i] = nextInt();
        }
        return temp;
    }

    public long[] nextLArray(int n) throws IOException {
        long[] temp = new long[n];
        for (int i = 0; i < n; i++) {
            temp[i] = nextLong();
        }
        return temp;
    }

    final BufferedReader br;
    final PrintWriter pw;
    StringTokenizer st;
}