#include <bits/stdc++.h>
using namespace std;
long long a1[200003], a2[200003], x;
long long cal(int n) {
  int sum = 0;
  long long sum_id = 2;
  long long now = 2LL;
  long long m = 0;
  for (int i = 1; i <= n; i++) m = max(a2[i], m);
  while (now <= m) {
    int res = 0;
    for (int i = 1; i <= n; i++) {
      if (a2[i] % now == 0) {
        a2[i] /= now;
        if (a2[i] % 2LL) {
          res++;
        }
        a2[i] *= now;
      }
    }
    if (res > sum) {
      sum = res;
      sum_id = now;
    }
    now *= 2LL;
  }
  return sum_id;
}
int main() {
  int n;
  scanf("%d", &n);
  int sum1 = 0, sum2 = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &x);
    if (x % 2LL == 0) {
      a2[++sum2] = x;
    } else {
      a1[++sum1] = x;
    }
  }
  long long now = cal(sum2);
  int res = 0;
  for (int i = 1; i <= sum2; i++) {
    if (a2[i] % now == 0) {
      a2[i] /= now;
      if (a2[i] % 2LL) {
        res++;
      }
      a2[i] *= now;
    }
  }
  if (res > sum1) {
    printf("%d\n", n - res);
    for (int i = 1; i <= sum1; i++)
      if (a1[i] % now) printf("%I64d ", a1[i]);
    for (int i = 1; i <= sum2; i++)
      if (a2[i] % now || (a2[i] % now == 0 && (a2[i] / now) % 2LL == 0))
        printf("%I64d ", a2[i]);
  } else {
    printf("%d\n", sum2);
    for (int i = 1; i <= sum2; i++) printf("%I64d ", a2[i]);
  }
}
