#include <bits/stdc++.h>
using namespace std;
const int MAXM = 1e6 + 10;
int S[MAXM];
int main() {
  int m;
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &S[i]);
    if (S[i] % S[0] != 0) {
      puts("-1");
      return 0;
    }
  }
  vector<int> ans;
  ans.push_back(S[0]);
  for (int i = 1; i < m; i++) {
    ans.push_back(S[i]);
    ans.push_back(S[0]);
  }
  printf("%d\n", ans.size());
  for (auto a : ans) printf("%d ", a);
  return 0;
}
