#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char ch = getchar();
  long long res = 0, pd = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') pd = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    res = (res << 1) + (res << 3) + ch - '0';
    ch = getchar();
  }
  return res * pd;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 | '0');
}
inline void wlk(long long x) {
  write(x);
  putchar(32);
}
inline void wln(long long x) {
  write(x);
  putchar(10);
}
const long long maxn = 100003;
long long a[maxn];
signed main() {
  long long n = read(), flag = 1;
  for (long long i = 1; i <= n; ++i) a[i] = read();
  for (long long i = 2; i <= n; ++i)
    if (a[i] % a[1] != 0) flag = 0;
  if (!flag) return puts("-1"), 0;
  wln(2 * n);
  for (long long i = 1; i <= n; ++i) {
    wlk(a[1]), wlk(a[i]);
  }
  return puts(""), 0;
}
