#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
inline long long gcd(long long a, long long b) {
  return !b ? a : gcd(b, a % b);
}
inline long long q_pow(long long a, long long x) {
  long long ans = 1, tmp = a;
  while (x) {
    if (x & 1) (ans *= tmp) %= mod;
    (tmp *= tmp) %= mod;
    x >>= 1;
  }
  return ans;
}
template <typename T>
inline void re(T &N) {
  int f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f = -1;
  N = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') N = N * 10 + c - '0';
  N *= f;
}
int m, n, t = 1, st, en;
int a[N], b[N];
char s[N];
int main() {
  re(n);
  for (int i = 1; i <= n; i++) re(a[i]);
  int mi = *min_element(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++)
    if (a[i] % mi) return puts("-1"), 0;
  printf("%d\n", 2 * n);
  for (int i = 1; i <= n; i++) printf("%d %d ", a[i], mi);
  puts("");
}
