#include <bits/stdc++.h>
using namespace std;
int a[1000 + 10];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    if (a[i] % a[0] != 0) {
      cout << -1;
      return 0;
    }
  }
  cout << 2 * n - 1 << endl;
  cout << a[0] << ' ';
  for (int i = 1; i < n; i++) {
    cout << a[0] << ' ' << a[i] << ' ';
  }
  return 0;
}
