#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[300000];
vector<long long> graph[61];
long long vis[300000];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 60; i >= 0; i--) {
    long long poi = pow(2, i);
    for (long long j = 0; j < n; j++) {
      if (vis[j] == 0) {
        if (a[j] % poi == 0) {
          graph[i].push_back(a[j]);
          vis[j] = 1;
        }
      }
    }
  }
  long long maxi = 0;
  for (long long i = 0; i <= 60; i++) {
    maxi = max(maxi, (long long)graph[i].size());
  }
  for (long long i = 0; i <= 60; i++) {
    if (graph[i].size() == maxi) {
      graph[i].clear();
      break;
    }
  }
  vector<long long> output;
  for (long long i = 0; i <= 60; i++) {
    for (long long j = 0; j < graph[i].size(); j++) {
      output.push_back(graph[i][j]);
    }
  }
  cout << output.size() << endl;
  for (long long i = 0; i < output.size(); i++) {
    cout << output[i] << " ";
  }
  return 0;
}
