#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
int n, m[N];
int gcd(int a, int b) {
  int c;
  while (b > 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &m[i]);
  if (n == 1) {
    printf("1\n");
    printf("%d", m[1]);
    return 0;
  }
  int x = m[1];
  for (int i = 2; i <= n; i++) x = gcd(x, m[i]);
  if (x != m[1]) {
    printf("-1");
    return 0;
  }
  printf("%d\n", 2 * n);
  for (int i = 1; i <= n; i++) {
    printf("%d %d ", m[i], m[1]);
  }
  return 0;
}
