#include <bits/stdc++.h>
using namespace std;
void swap(int &a, int &b) {
  if (a < b) {
    int c = a;
    a = b;
    b = c;
  }
}
int gcd(int a, int b) {
  swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int m;
  cin >> m;
  vector<int> v;
  v.clear();
  for (int i = 0; i < m; ++i) {
    int c;
    cin >> c;
    v.push_back(c);
  }
  int all_gcd = v[0];
  for (int i = 0; i < m; ++i) {
    all_gcd = gcd(all_gcd, v[i]);
  }
  if (all_gcd == v[0]) {
    cout << v.size() * 2 << endl;
    for (int i = 0; i < m; ++i) {
      cout << all_gcd << " ";
      if (i == m - 1)
        cout << v[i] << endl;
      else
        cout << v[i] << " ";
    }
  } else
    cout << "-1" << endl;
  return 0;
}
