#include <bits/stdc++.h>
int chk[1000010];
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
int o[1010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &o[i]);
    chk[o[i]] = 1;
  }
  int p = o[0];
  for (int i = 1; i < n; i++) {
    p = gcd(p, o[i]);
  }
  if (p != o[0]) {
    printf("-1\n");
    return 0;
  }
  if (n == 1) {
    printf("1\n");
    printf("%d\n", p);
    return 0;
  }
  printf("%d\n", 2 * n - 2);
  for (int i = 1; i < n; i++) printf("%d %d ", o[i], p);
  printf("\n");
  return 0;
}
