#include <bits/stdc++.h>
using namespace std;
using LL = int64_t;
using LD = long double;
const LL INF = 0x3f3f3f3f;
const LL mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& i : a) cin >> i;
  for (int i = 1; i < n; i++) {
    if (a[i] % a[0]) {
      cout << "-1\n";
      return 0;
    }
  }
  cout << 2 * n << '\n';
  for (int i = 0; i < n; i++) cout << a[0] << ' ' << a[i] << ' ';
}
