#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 9;
int gcd(int a, int b) {
  int c;
  while (b) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int arr[1111];
int main() {
  int m;
  while (cin >> m) {
    for (int i = 0; i < m; i++) {
      cin >> arr[i];
    }
    int g = arr[0];
    int mi = arr[0];
    for (int i = 1; i < m; i++) {
      g = gcd(g, arr[i]);
      mi = min(mi, arr[i]);
    }
    if (g % mi) {
      cout << -1 << endl;
      continue;
    }
    cout << m * 2 << endl;
    for (int i = 0; i < m; i++) {
      if (i) cout << ' ';
      cout << arr[i] << ' ' << mi;
    }
    cout << endl;
  }
}
