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

import java.awt.Point;
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static StringBuilder a = new StringBuilder();

    public static void main(String[] args) throws IOException {
//        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//(new FileReader("input.in"));
//        StringBuilder out = new StringBuilder();
//        StringTokenizer tk;
//        tk = new StringTokenizer(in.readLine());
        //Scanner Reader = new Scanner(System.in);
        Reader.init(System.in);
        StringBuilder o = new StringBuilder();
        int n = Reader.nextInt();

        ArrayList<Integer> answer = new ArrayList<>();
        int count = 0;
        answer.add(Reader.nextInt());
        for(int i = 1; i < n; i++) {
            int b = Reader.nextInt();
            int a = answer.get(answer.size()-1);

            if(gcd(a,b) != 1) {
                answer.add(1);
                count++;
            }
            answer.add(b);
        }

        System.out.println(count);
        for(Integer x : answer) {
            System.out.print(x + " ");
        }
    }

    public static int gcd(int a, int b) {
        while(b > 0) {
            int c = a;
            a = b;
            b = c % b;
        }
        return a;
    }
}




//class Part implements Comparator<Part>{
//
//    int l, r, t, c;
//    public Part(){}
//
//    public Part(int a, int b, int z, int d) {
//        l = a;
//        r = b;
//        t = z;
//        c = d;
//
//    }
//
// @Override
//    public int compare(Part o1, Part o2) {
//        if (o1.t > o2.t) {
//            return 1;
//        } else if (o1.t < o2.t) {
//            return -1;
//        }
//        return 0;
//    }
//}
//class Point implements Comparable<Point> {
//
//    int x, y;
//
//    public Point(int a, int b) {
//        x = a;
//        y = b;
//
//    }
//
//    @Override
//    public boolean equals(Object object) {
//        boolean sameSame = false;
//
//        if (object != null && object instanceof Point) {
//            sameSame = this.x == ((Point) object).x;
//        }
//
//
//        return sameSame;
//    }
//
//
//    @Override
//    public int compareTo(Point o) {
//        return this.y-o.y;
//    }
//}
//class Book {
//
//    String a;
//    int b, c,ind;
//
//    public Book(String x, int y) {
//        a = x;
//        b = y;
//
//
//    }
//
//    @Override
//    public boolean equals(Object object) {
//        boolean sameSame = false;
//
//        if (object != null && object instanceof Book) {
//            sameSame = (this.a == null ? ((Book) object).a == null : this.a.equals(((Book) object).a));
//        }
//        if (object != null && object instanceof Book) {
//            sameSame = this.b == ((Book) object).b;
//        }
//
//        return sameSame;
//    }
//}
//
class Reader {

    static StringTokenizer tokenizer;
    static BufferedReader reader;

    public static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    public static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    public static String nextLine() throws IOException {
        return reader.readLine();
    }

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

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

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