#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
const double eps = 1e-10;
template <typename A, typename B>
inline void chmin(A &a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A &a, B b) {
  if (a < b) a = b;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  ll a[1000010] = {};
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  ll al = a[0];
  for (int i = 0; i < (n); i++) {
    al = gcd(al, a[i]);
  }
  if (al != a[0]) {
    cout << -1 << endl;
    return 0;
  }
  cout << 2 * n << endl;
  for (int i = 0; i < (n); i++) {
    cout << a[i] << " " << a[0] << " ";
  }
  cout << endl;
}
