#include <bits/stdc++.h>
const int MAXM = 1000 + 10;
int M;
int A[MAXM];
int Gcd;
int ans1, ans2[MAXM];
bool visited[1000001];
int main() {
  register int i;
  scanf("%d", &M);
  for (i = 1; i <= M; ++i) {
    scanf("%d", A + i);
    if (A[i] % A[1] != 0) return !printf("-1");
  }
  printf("%d\n", (M << 1) - 1);
  for (i = 1; i <= M; ++i)
    i == 1 ? printf("%d ", A[i])
           : printf(i == M ? "%d %d\n" : "%d %d ", A[i], A[1]);
  return 0;
}
