#include <bits/stdc++.h>
using namespace std;
const int mm = 2e5 + 100;
long long int n, m, k;
long long int d[mm], sum[mm], hou[mm], num[mm];
int main() {
  long long int i, j, a, b, c;
  scanf("%lld", &n);
  ;
  for (i = 1; i <= n; i++) scanf("%lld", &d[i]);
  long long int o = 0;
  for (i = 1; i <= n; i++) {
    if (d[i] % d[1] != 0) o = 1;
  }
  if (o)
    printf("-1\n");
  else {
    printf("%lld\n", 2 * n);
    for (i = 1; i <= n; i++) {
      printf("%lld %lld ", d[i], d[1]);
    }
    printf("\n");
  }
}
