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.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class SolutionD {

    private static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        Reader reader = new Reader();
        int n = reader.readIntValue();

        long[] values = reader.readLongNumbers();
        if(values.length == 1) {
            System.out.println(0);
        } else {
            long divider = 2;
            long maxDivider = 1;
            long maxValuesCount = 0;

            long maxValue = Arrays.stream(values).max().getAsLong();
            
            while (divider <= maxValue) {
                long currDivider = divider;
                long previousDivider = currDivider / 2;
                long currCount = Arrays.stream(values)
                        .filter(value -> (value % previousDivider == 0 && value % currDivider != 0))
                        .count();
                if (currCount > maxValuesCount) {
                    maxValuesCount = currCount;
                    maxDivider = currDivider;
                }

                divider *= 2;
            }

            int valuesNum = 0;
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < n; i++) {
                long currDivider = maxDivider;
                long previousDivider = maxDivider / 2;
                if (values[i] % currDivider == 0 || values[i] % previousDivider != 0) {
                    valuesNum++;
                    sb.append(values[i]).append(" ");
                }
            }
            bw.write(String.valueOf(valuesNum));
            bw.write("\n");
            bw.write(sb.toString());
            bw.flush();
        }

    }

}

class Reader {

    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

    public StringTokenizer getStringTokenizer() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        return new StringTokenizer(line, " ");
    }

    public int getNextInt(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return Integer.parseInt(stringTokenizer.nextToken());
        }
        throw new RuntimeException("no more tokens in string");
    }

    public long getNextLong(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return Long.parseLong(stringTokenizer.nextToken());
        }
        throw new RuntimeException("no more tokens in string");
    }

    public String getNextString(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return stringTokenizer.nextToken();
        }
        throw new RuntimeException("no more tokens in string");
    }

    public String readStringValue() throws IOException {
        return bufferedReader.readLine().replaceAll("\\s+$", "");
    }

    public int readIntValue() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        int parsedToInt = Integer.parseInt(line);
        return parsedToInt;
    }

    public int[] readIntNumbers() throws IOException {
        String[] line = bufferedReader.readLine().replaceAll("\\s+$", "").split(" ");
        int[] parsedToInt = Arrays.stream(line).mapToInt(Integer::parseInt).toArray();
        return parsedToInt;
    }

    public long readLongValue() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        long parsedToLong = Long.parseLong(line);
        return parsedToLong;
    }

    public long[] readLongNumbers() throws IOException {
        String[] line = bufferedReader.readLine().replaceAll("\\s+$", "").split(" ");
        long[] parsedToLong = Arrays.stream(line).mapToLong(Long::parseLong).toArray();
        return parsedToLong;
    }

}