#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
long long a[N], b[100];
vector<int> v[100];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    long long tmp = a[i];
    int x = 0;
    while ((a[i] & 1) == 0) a[i] >>= 1, x++;
    b[x]++;
    v[x].push_back(i);
    a[i] = tmp;
  }
  long long ans = 0;
  for (int i = 0; i < 100; i++) ans = max(ans, b[i]);
  for (int i = 0; i < 100; i++) {
    if (ans == b[i]) {
      cout << n - v[i].size() << endl;
      for (int j = 0; j < i; j++)
        for (int k : v[j]) cout << a[k] << ' ';
      for (int j = i + 1; j < 100; j++)
        for (int k : v[j]) cout << a[k] << ' ';
      cout << endl;
      return 0;
    }
  }
}
