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;
void debug_out() { cout << '\n'; }
template <typename T, typename... R>
void debug_out(const T &f, const R &...r) {
  cout << f << " ";
  debug_out(r...);
}
template <typename A, typename B>
ostream &operator<<(ostream &out, const pair<A, B> &a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename Tuple, size_t N>
struct tuple_print {
  static void print(const Tuple &t, std::ostream &os) {
    tuple_print<Tuple, N - 1>::print(t, os);
    os << ", " << std::get<N - 1>(t);
  }
};
template <typename Tuple>
struct tuple_print<Tuple, 1> {
  static void print(const Tuple &t, std::ostream &os) {
    os << "(" << std::get<0>(t);
  }
};
template <typename... Args>
ostream &operator<<(ostream &os, const tuple<Args...> &t) {
  tuple_print<decltype(t), sizeof...(Args)>::print(t, os);
  return os << ")";
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &a) {
  out << "[";
  bool first = true;
  for (auto &v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "]";
  return out;
}
template <typename T, class Cmp>
ostream &operator<<(ostream &out, const set<T, Cmp> &a) {
  out << "{";
  bool first = true;
  for (auto &v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename U, typename T, class Cmp>
ostream &operator<<(ostream &out, const map<U, T, Cmp> &a) {
  out << "{";
  bool first = true;
  for (auto &p : a) {
    out << (first ? "" : ", ");
    out << p.first << ":" << p.second;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
const long long mod = 1e9 + 7;
const int N = 1e6 + 100;
int T;
long long n;
long long b[N], tot[N], c[100];
int main() {
  scanf("%lld", &n);
  long long maxx = 0, pos = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
    long long x = b[i], cnt = 0;
    for (; !(x & 1); x >>= 1, ++cnt)
      ;
    tot[i] = cnt;
    ++c[cnt];
    if (c[cnt] > maxx) maxx = c[cnt], pos = cnt;
  }
  printf("%lld\n", n - maxx);
  for (int i = 1; i <= n; i++)
    if (tot[i] != pos) printf("%lld ", b[i]);
  return 0;
}