#include <bits/stdc++.h>
using namespace std;
int A[100010];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  int x = A[0];
  for (int i = 1; i < n; i++) {
    x = gcd(x, A[i]);
  }
  if (x != A[0])
    cout << -1 << '\n';
  else {
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      ans.push_back(A[i]);
      ans.push_back(A[0]);
    }
    cout << ans.size() << '\n';
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << '\n';
  }
}
