#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, a[N], fuck;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
signed main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    fuck = gcd(fuck, a[i]);
  }
  if (fuck != a[1]) {
    puts("-1");
    return 0;
  }
  cout << 2 * n << endl;
  for (int i = 1; i <= n; ++i) {
    cout << a[1] << ' ' << a[i] << ' ';
  }
  return 0;
}
