#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
const long long inf = 1e18;
const int mod = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i > 1) {
      if (a[i] % a[1]) {
        cout << -1;
        return 0;
      }
    }
  }
  cout << 2 * n - 1 << "\n" << a[1];
  for (int i = 2; i <= n; i++) cout << " " << a[1] << " " << a[i];
}
