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 PYTHON):

Solution:
#
# http://codeforces.com/problemset/problem/660/A
import sys

M = 100000


def read_line():
    return next(sys.stdin).strip()


def read_int():
    return int(read_line())


def read_ints():
    return map(int, read_line().split())


def make_sieve(M):
    sieve = [0] * (M + 1)
    for p in xrange(2, M + 1):
        if not sieve[p]:
            for q in xrange(p, M + 1, p):
                sieve[q] = p
    return sieve


def _factor(x):
    if x > M:
        yield x
        return

    while x > 1:
        p = sieve[x]
        y, r = divmod(x, p)
        while r == 0:
            x = y
            y, r = divmod(x, p)
        yield p


def factor(x):
    if x > M:
        for p in basic_primes:
            if p * p > x:
                break
            y, r = divmod(x, p)
            if r == 0:
                yield p
                while r == 0:
                    x = y
                    y, r = divmod(x, p)
            if x <= M:
                break

    for p in _factor(x):
        yield p


def coprime(x_factors, y_factors):
    if not x_factors or not y_factors:
        return True

    a, b = iter(x_factors), iter(y_factors)
    x, y = next(a), next(b)
    try:
        while x != y:
            if x < y:
                x = next(a)
            else:
                y = next(b)
    except StopIteration:
        return True
    return False


def gen():
    it = iter(B)
    x, x_factors = next(it)
    yield x
    for y, y_factors in it:
        if not coprime(x_factors, y_factors):
            yield 1
        yield y
        x, x_factors = y, y_factors


sieve = make_sieve(M)
basic_primes = [p for p in sieve if sieve[p] == p and p > 1]
N, A = read_int(), read_ints()
B = [(x, sorted(factor(x))) for x in A]
result = list(gen())
print len(result) - N
print ' '.join(map(str, result))