#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  scanf("%d", &n);
  int arr[1001];
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int r = arr[0];
  for (int i = 1; i < n; i++) {
    r = gcd(r, arr[i]);
  }
  if (r == arr[0]) {
    printf("%d\n", 2 * n - 1);
    for (int i = 0; i < n - 1; i++) {
      printf("%d %d ", arr[i], arr[0]);
    }
    printf("%d", arr[n - 1]);
  } else {
    printf("-1");
  }
  return 0;
}
