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