#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using pill = pair<int, ll>;
using vvi = vector<vi>;
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll fast_exp(ll base, ll n, ll m) {
  if (n == 0) return 1;
  ll t = fast_exp(base, n / 2, m);
  if (n % 2 == 0)
    return (t * t) % m;
  else
    return (((t * t) % m) * base) % m;
}
int main() {
  ios::sync_with_stdio(false);
  int m;
  cin >> m;
  vi g(m, 0);
  for (int i = 0; i < m; ++i) cin >> g[i];
  if (m == 1) {
    cout << "1\n" << g[0] << "\n";
    return 0;
  }
  for (int i = 1; i < m; ++i)
    if (g[i] % g[0] != 0) {
      cout << "-1\n";
      return 0;
    }
  cout << 2 * (m - 1) << "\n" << g[0] << " ";
  for (int i = 1; i < m - 1; ++i) cout << g[i] << " " << g[0] << " ";
  cout << g[m - 1] << "\n";
  return 0;
}
