#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  long long int n, temp;
  cin >> n;
  vector<vector<long long int>> v(61);
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    int index;
    for (int j = 0; j < 61; ++j) {
      if (temp & (1ll << j)) {
        index = j;
        break;
      }
    }
    v[index].push_back(temp);
  }
  long long int ans = n, high = -1;
  for (int i = 0; i < 61; ++i) {
    if (n - v[i].size() < ans) {
      ans = n - v[i].size();
      high = i;
    }
  }
  cout << ans << "\n";
  for (int i = 0; i < 61; ++i) {
    if (i == high)
      continue;
    else {
      for (auto j : v[i]) cout << j << " ";
    }
  }
}
