#include <bits/stdc++.h>
using namespace std;
int cnt[1005];
static int gcd(int a, int b) {
  if (a < b) {
    int temp = a;
    a = b;
    b = temp;
  }
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  set<int> seta;
  for (int i = 1; i <= n; i++) {
    cin >> cnt[i];
    seta.insert(cnt[i]);
  }
  int temp = cnt[1];
  for (int i = 2; i <= n; i++) {
    temp = gcd(cnt[i], temp);
  }
  if (seta.find(temp) == seta.end()) {
    cout << "-1";
    return 0;
  }
  cout << 2 * n << "\n";
  for (int i = 1; i <= n; i++) {
    cout << cnt[i] << " " << temp << " ";
  }
}
