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

Solution:
import math
import logging


class CF660a(object):
    prime_numbers_set = set()
    prime_numbers_list = list()
    count = 0

    def __init__(self):
        self.log = logging.getLogger("CF660a")
        super(CF660a, self).__init__()

    def is_prime(self, number):
        limit = int(math.sqrt(number)) + 1
        for i in range(1, len(self.prime_numbers_list)):
            n = self.prime_numbers_list[i]
            if n >= limit:
                break
            if number % n == 0:
                return False
        return True

    def init_primes(self, upper=10 ** 9):
        limit = int(math.sqrt(upper)) + 2
        # start from 3, don't check multiplies of 1.
        # and skip even numbers, too
        self.prime_numbers_set = set(range(3, limit, 2))
        self.prime_numbers_set.add(2)  # 2 is a prime number too.

        self.prime_numbers_list = [1,2]
        for i in range(3, limit, 2):
            if i in self.prime_numbers_set:
                self.prime_numbers_set.difference_update(range(i+i, limit, i))
        self.prime_numbers_list = sorted(self.prime_numbers_set)

    def prime_divisors(self, number):
        self.log.debug("looking for divisors for %d", number)
        divisors = {1, number}  # this is a default for any number

        if number in self.prime_numbers_set:
            self.log.debug("the number is prime")
            return divisors

        for prime in self.prime_numbers_list:
            if prime > number:
                self.log.debug("don't check upper bound %d", prime)
                break

            if number % prime == 0:
                self.log.debug("found prime divisor %d", prime)
                divisors.add(prime)
                self.log.debug("found also adding result %d", number/prime)
                divisors.add(number / prime)
        return divisors

    def process(self, numbers):
        prev_divisors = {1}
        for number in numbers:
            divisors = self.prime_divisors(number)
            if divisors.intersection(prev_divisors) != {1}:
                self.count += 1
                yield 1
                yield number
            else:
                yield number
            prev_divisors = divisors


def main():
    in_count = input()  # don't need this in python
    in_numbers = map(int, input().split())

    solution = CF660a()
    solution.init_primes()
    result = list(map(str, solution.process(in_numbers)))
    print(solution.count)
    print(" ".join(result))

if __name__ == "__main__":
    main()