#include <bits/stdc++.h>
int main() {
  int n, a[1005], f;
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    f = 1;
    for (int i = 1; i <= n; i++)
      if (a[i] % a[1] != 0) f = 0;
    if (!f) {
      printf("-1\n");
      continue;
    }
    printf("%d\n", n * 2);
    printf("%d %d", a[1], a[1]);
    for (int i = 2; i <= n; i++) printf(" %d %d", a[i], a[1]);
    printf("\n");
  }
  return 0;
}
