#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int a[1005];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int now = a[0];
  for (int i = 1; i < n; i++) {
    now = gcd(now, a[i]);
  }
  if (a[0] / now != 1) {
    cout << "-1" << endl;
  } else {
    cout << n * 4 << endl;
    for (int i = 0; i < n; i++) {
      printf("%d %d %d %d ", a[i], a[i], a[0], a[0]);
    }
  }
  return 0;
}
