#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e3 + 5;
int a[MaxN], n;
bool vis[MaxN];
int main() {
  scanf("%d", &n);
  bool flag = true;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] % a[1]) flag = false;
  }
  if (!flag)
    puts("-1");
  else {
    printf("%d\n", 2 * n);
    for (int i = 1; i <= n; ++i) printf("%d %d ", a[1], a[i]);
  }
  return 0;
}
