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:
//package com.example.programmingpractice;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class CodeforcesNT {

    static String[] sTakeInputs;
    static int sIntInputPos = 0;
    static int sLongInputPos = 0;
    static BufferedReader sBufferedReader;

    static int[] scanIntArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        int[] arr = new int[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Integer.parseInt(inputs[i]);
        return arr;
    }

    static long[] scanLongArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        long[] arr = new long[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Long.parseLong(inputs[i]);
        return arr;
    }

    static int scanInt() throws Exception{
        return Integer.parseInt(sBufferedReader.readLine().trim());
    }

    static long scanLong() throws Exception{
        return Long.parseLong(sBufferedReader.readLine().trim());
    }

    static int nextInt() throws Exception {
        if(sIntInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sIntInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Integer.parseInt(sTakeInputs[sIntInputPos++]);
    }



    static long nextLong() throws Exception {
        if(sLongInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sLongInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Integer.parseInt(sTakeInputs[sLongInputPos++]);
    }

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

    public static void main (String[] args) throws Exception {
        sBufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int m = scanInt();
        int[] arr = scanIntArray();
        StringBuilder sb = new StringBuilder();
        sb.append(arr[0]);
        int count = 0;
        for(int i = 1; i<arr.length; i++) {
            sb.append(' ');
            if(gcd(arr[i-1], arr[i])>1) {
                sb.append("1 ");
                count++;
            }
            sb.append(arr[i]);
        }
        StringBuilder ans = new StringBuilder();
        ans.append(count).append('\n').append(sb);
        System.out.println(ans);
    }
}