#include <bits/stdc++.h>
using namespace std;
int _I() {
  int x;
  scanf("%d", &x);
  return x;
}
int max_sum(int ar[], int n) {
  int sum = 0;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    sum += ar[i];
    if (sum < 0) {
      sum = 0;
    }
    mx = max(mx, sum);
  }
  return mx;
}
void solve() {
  int ar[10001];
  int n = _I();
  for (int i = 0; i < n; i++) {
    ar[i] = _I();
  }
  for (int i = 0; i < n; i++) {
    if (ar[i] % ar[0]) {
      printf("-1\n");
      return;
    }
  }
  printf("%d\n", n * 2);
  for (int i = 0; i < n; i++) {
    printf("%d %d ", ar[i], ar[0]);
  }
}
int main() {
  bool f = 0;
  solve();
  return 0;
}
