Problem: Boy Dima gave Julian a birthday present — set B consisting of positive integers. However, he didn't know, that Julian hates sets, but enjoys bipartite graphs more than anything else!

Julian was almost upset, but her friend Alex said, that he can build an undirected graph using this set in such a way: let all integer numbers be vertices, then connect any two i and j with an edge if |i - j| belongs to B.

Unfortunately, Julian doesn't like the graph, that was built using B. Alex decided to rectify the situation, so he wants to erase some numbers from B, so that graph built using the new set is bipartite. The difficulty of this task is that the graph, Alex has to work with, has an infinite number of vertices and edges! It is impossible to solve this task alone, so Alex asks you for help. Write a program that erases a subset of minimum size from B so that graph constructed on the new set is bipartite.

Recall, that graph is bipartite if all its vertices can be divided into two disjoint sets such that every edge connects a vertex from different sets.

Input

First line contains an integer n ~ (1 ⩽ n ⩽ 200 000) — size of B

Second line contains n integers b_1, b_2, …, b_n ~ (1 ⩽ b_i ⩽ 10^{18}) — numbers of B, all b_i are unique

Output

In the first line print single integer k – the number of erased elements. In the second line print k integers — values of erased elements.

If there are multiple answers, print any of them.

Examples

Input


3
1 2 3


Output


1
2 

Input


2
2 6


Output


0

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if ((long double)a.first / (a.second * 1.0) <
      (long double)b.first / (b.second * 1.0))
    return true;
  else if ((long double)a.first / (a.second * 1.0) ==
           (long double)b.first / (b.second * 1.0))
    return a.second > b.second;
  else
    return false;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n % 2 != 0) {
      res *= a;
      n -= 1;
      res %= 1000000007;
    } else {
      a *= a;
      n /= 2;
      a %= 1000000007;
    }
  }
  return res;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0 || n % (i + 2) == 0) {
      return false;
    }
  }
  return true;
}
void primeFactors(long long n) {
  while (n % 2 == 0) {
    cout << 2 << " ";
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      cout << i << " ";
      n = n / i;
    }
  }
  if (n > 2) {
    cout << n << " ";
  }
}
void printDivisors(long long n) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        cout << i << " ";
      else
        cout << i << " " << n / i << " ";
    }
  }
}
void BellmanFord(long long graph[][3], long long V, long long E,
                 long long src) {
  long long dis[V];
  for (long long i = 0; i < V; i++) dis[i] = INT_MAX;
  dis[src] = 0;
  for (long long i = 0; i < V - 1; i++) {
    for (long long j = 0; j < E; j++) {
      if (dis[graph[j][0]] + graph[j][2] < dis[graph[j][1]])
        dis[graph[j][1]] = dis[graph[j][0]] + graph[j][2];
    }
  }
  bool flag = true;
  for (long long i = 0; i < E; i++) {
    long long x = graph[i][0], y = graph[i][1], weight = graph[i][2];
    if (dis[x] != INT_MAX && dis[x] + weight < dis[y]) {
      flag = false;
      break;
    }
  }
}
void topoSort(long long n, long long m, vector<vector<bool>> &e,
              vector<bool> &visited, long long x) {
  visited[x] = true;
  for (long long i = n - 1; i >= 0; i--) {
    if (e[x][i] and !visited[i]) {
      topoSort(n, m, e, visited, i);
    }
  }
  return;
}
void convertGraphToTree(long long x, vector<vector<long long>> &v,
                        vector<bool> &visited,
                        vector<vector<long long>> &newedges) {
  visited[x] = true;
  for (long long i = 0; i < v[x].size(); i++) {
    if (!visited[v[x][i]]) {
      newedges[x].push_back(v[x][i]);
      convertGraphToTree(v[x][i], v, visited, newedges);
    }
  }
  return;
}
long long subtreeCount(long long x, vector<vector<long long>> &v,
                       vector<bool> &visited, vector<long long> &count) {
  visited[x] = true;
  long long ans = 1;
  for (long long i = 0; i < v[x].size(); i++) {
    if (!visited[v[x][i]]) {
      ans += subtreeCount(v[x][i], v, visited, count);
    }
  }
  count[x] = ans;
  return ans;
}
void create_sparse_table(long long n, vector<long long> &v) {
  long long k = (long long)log2(n * 1.0);
  vector<vector<long long>> st(n + 1, vector<long long>(k + 1, 0));
  for (long long i = 0; i < n; i++) st[i][0] = v[i];
  for (long long j = 1; j <= k; j++) {
    for (long long i = 0; i + (1 << j) <= n; i++)
      st[i][j] = min(st[i][j - 1], st[i + (1 << (j - 1))][j - 1]);
  }
  return;
}
vector<long long> fact(200001, 1);
void preNCR() {
  for (long long i = 2; i < 200001; i++) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
  }
  return;
}
long long ncr(long long n, long long r) {
  if (r > n) {
    return 0;
  }
  long long res = fact[n];
  res *= (power(fact[r], 1000000007 - 2) % 1000000007);
  res %= 1000000007;
  res *= (power(fact[n - r], 1000000007 - 2) % 1000000007);
  res %= 1000000007;
  return res;
}
void yes() { cout << "YES" << '\n'; }
void no() { cout << "NO" << '\n'; }
void helper(long long n, vector<long long> &v) {
  vector<vector<long long>> temp(62, vector<long long>());
  long long largest = -1, thatpow = -1;
  for (long long i = 0; i < n; i++) {
    long long count = 0;
    long long farzi = v[i];
    while (v[i] % 2 == 0) v[i] /= 2, count += 1;
    temp[count].push_back(farzi);
    if (largest < temp[count].size())
      largest = max(largest, (long long)temp[count].size()), thatpow = count;
  }
  long long ans = n - largest;
  cout << ans << '\n';
  for (long long i = 0; i < 62; i++) {
    if (i != thatpow and temp[i].size()) {
      for (long long j = 0; j < temp[i].size(); j++) cout << temp[i][j] << '\n';
    }
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> v(n, 0);
  for (long long i = 0; i < n; i++) cin >> v[i];
  helper(n, v);
  return 0;
}