#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1LL;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long inv(long long n) { return power(n, 1000000007 - 2) % 1000000007; }
long long isprime(long long n) {
  if (n < 2) return 0;
  long long i;
  for (i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
long long sq(long long n) { return n * n; }
const long long N = 1005;
long long n, a[20005];
void solve() {
  cin >> n;
  long long i;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 2; i <= n; i++)
    if (a[i] % a[1]) {
      cout << "-1\n";
      return;
    }
  cout << 2 * n << "\n";
  for (i = 1; i <= n; i++) cout << a[i] << " " << a[1] << " ";
  cout << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  long long tc = 0;
  while (t--) {
    tc++;
    solve();
  }
}
