#include <bits/stdc++.h>
using namespace std;
void _dbg(string) { cout << endl; }
template <class H, class... T>
void _dbg(string s, H h, T... t) {
  int l = s.find(',');
  cout << s.substr(0, l) << " = " << h << ", ";
  _dbg(s.substr(l + 1), t...);
}
template <class T, class U>
ostream &operator<<(ostream &o, const pair<T, U> &p) {
  o << "(" << p.first << "," << p.second << ")";
  return o;
}
template <class T>
ostream &operator<<(ostream &o, const vector<T> &v) {
  o << "[";
  for (T t : v) {
    o << t << ",";
  }
  o << "]";
  return o;
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = (int)(0); i < (int)(n); i++) scanf("%d", &v[i]);
  for (int i = (int)(0); i < (int)(n); i++)
    if (v[i] % v[0] != 0) {
      cout << -1 << endl;
      return 0;
    }
  cout << n * 2 << "\n";
  for (int i = (int)(0); i < (int)(n); i++)
    cout << v[i] << " " << v[0] << " \n"[i == n - 1];
  return 0;
}
