#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int m, s[2000];
void end() {
  cout << -1;
  exit(0);
}
int main() {
  cin >> m;
  int mn = 1e9;
  for (int i = 0; i < m; i++) {
    cin >> s[i];
    mn = min(mn, s[i]);
  }
  int g = s[0];
  for (int i = 1; i < m; i++) {
    g = gcd(g, s[i]);
  }
  if (g != mn) {
    cout << -1;
    return 0;
  }
  cout << (2 * m - 1) << endl;
  for (int i = 0; i < m; i++) {
    cout << s[i] << " ";
    if (i != m - 1) cout << mn << " ";
  }
  return 0;
}
