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

Solution:
#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
bool revisa(int n, int k) {
  vector<int> dv;
  if (k > n) swap(k, n);
  for (int i = 1; i * i <= k; i++) {
    if (k % i == 0) {
      int div2 = k / i;
      dv.push_back(i);
      if (div2 != i) dv.push_back(div2);
    }
  }
  for (int i = 1; i < dv.size(); i++)
    if (n % dv[i] == 0) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  int cuenta = 0;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    arr.push_back(t);
    arr.push_back(0);
  }
  if (n == 1) {
    cout << 0 << endl << arr[0] << endl;
  } else {
    int y;
    if (n % 2 != 0)
      y = 2;
    else
      y = 3;
    for (int i = 0; i < arr.size() - y; i += 2) {
      if (arr[i] == arr[i + 2] && arr[i] != 1) {
        arr[i + 1] = 1;
        cuenta++;
      } else if (revisa(arr[i], arr[i + 2]) == true) {
        arr[i + 1] = 1;
        cuenta++;
      }
    }
    cout << cuenta << endl;
    for (int i = 0; i < arr.size(); i++) {
      if (arr[i] != 0) cout << arr[i] << " ";
    }
  }
}