#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return ((a > b) ? gcd(b, a % b) : gcd(a, b % a));
}
long long modPow(long long x, long long y, long long p) {
  long long res = 1 % p;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y / 2;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> ar(n), ans;
  for (long long i = (0); i < (n); ++i) {
    cin >> ar[i];
  }
  long long g = ar[0];
  for (long long i = (1); i < (n); ++i) {
    g = gcd(g, ar[i]);
    ans.push_back(ar[0]);
    ans.push_back(ar[i]);
  }
  if (g != ar[0]) {
    cout << -1;
    return 0;
  }
  ans.push_back(ar[0]);
  cout << ans.size() << endl;
  for (long long i = (0); i < (ans.size()); ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
