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 JAVA):

Solution:
import java.util.*;

/**
 * 关键概念定义：
 * 1、二分图：至少有两个顶点,所有环均为偶环，或者无环
 * 2、偶环：环的边数为偶数
 * 3、奇环：环的边数为奇数
 * 4、lcm：最小公倍数
 *
 * 分析过程：
 * 1、根据二分图的性质，我们的目标是在集合B中找到需要去掉的b，以保证最后的图中没有奇环。
 * 2、对于B集合里的任意一个整数b，在整数的全集合里满足两整数之差等于b的情况有非常多，因此可以形成很多条无尽链路，但是他们之间互不相交干涉，因此只需要考虑任意一种情况即可，例如从0开始的链路。
 * 3、对于B集合里的两个不相同的b1和b2，他们各自形成的链路不一样，但是一定会相交，然后形成环。
 * 4、那么问题聚焦在由#3形成的环，在什么情况下会出现奇环。
 * 4.1 b1和b2形成的链路（根据#2，我们考虑从0开始），会在lcm(b1,b2)的点上第一次相交，形成环（可以辅助画图理解）。
 * 4.2 环的边数 = lcm(b1,b2) / b1 + lcm(b1,b2) / b2，接下来需要思考环的奇偶性。
 * 4.3 当b1和b2都是奇数时，lcm(b1,b2) / b1 为奇数，lcm(b1,b2) / b2 也为奇数，和为偶数，是偶环。
 * 4.4 当b1为奇数，b2为偶数时，lcm(b1,b2) / b1 为偶数，lcm(b1,b2) / b2 也为奇数，和为奇数，是奇环。
 * 4.5 当b1为偶数，b2为奇数时，和上述步骤一样，也是奇环。
 * 4.6 当b1和b2都是偶数时，环的情况和 b1/2 和 b2/2 是一样的，因此可以转化为 4.3 or 4.4 or 4.5。
 * 4.7 结论：B集合里的所有b，不断的同时除以2，直到出现奇数时，如果B只有奇数，则无奇环，否则存在奇环。
 * 5、基于 #4.7 的结论，该问题最后简化为：B集合中，多次同时除以2之后，同时为奇数的最大子集合是可行的子集合
 * 6、再进一步简化就是，一个可行的子集合的充分必要条件是：所有整数在做二进制下末尾有相同数量的0
 */

public class CF1220D {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long[] b = new long[n];
        int[] b_end = new int[n];       //index : B的index; value : 末尾0的个数
        int[] end_cnt = new int[62];    //index : 末尾0的个数; value : 所拥有的b的个数

        int maxSize = 0;
        int targetEndCnt = 0;
        for(int i = 0; i < n; i++){
            b[i] = sc.nextLong();
            int zeroCnt = endZeroCnt(b[i]);
            b_end[i] = zeroCnt;
            end_cnt[zeroCnt]++;

            if(maxSize < end_cnt[zeroCnt]){
                maxSize = end_cnt[zeroCnt];
                targetEndCnt = zeroCnt;
            }
        }

        System.out.println(n - maxSize);
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < n; i++){
            if(b_end[i] != targetEndCnt){
                sb.append(b[i]).append(" ");
            }
        }
        System.out.println(sb.toString());
    }

    private static int endZeroCnt(long b){
        String str = Long.toBinaryString(b);
        int index = str.lastIndexOf("1");
        return str.length() - index - 1;
    }

}