Vitya has learned that the answer for The Ultimate Question of Life, the Universe, and Everything is not the integer 54 42, but an increasing integer sequence a_1, …, a_n. In order to not reveal the secret earlier than needed, Vitya encrypted the answer and obtained the sequence b_1, …, b_n using the following rules:

  * b_1 = a_1;
  * b_i = a_i ⊕ a_{i - 1} for all i from 2 to n, where x ⊕ y is the [bitwise XOR](https://en.wikipedia.org/wiki/Bitwise_operation#XOR) of x and y. 



It is easy to see that the original sequence can be obtained using the rule a_i = b_1 ⊕ … ⊕ b_i.

However, some time later Vitya discovered that the integers b_i in the cypher got shuffled, and it can happen that when decrypted using the rule mentioned above, it can produce a sequence that is not increasing. In order to save his reputation in the scientific community, Vasya decided to find some permutation of integers b_i so that the sequence a_i = b_1 ⊕ … ⊕ b_i is strictly increasing. Help him find such a permutation or determine that it is impossible.

Input

The first line contains a single integer n (1 ≤ n ≤ 10^5).

The second line contains n integers b_1, …, b_n (1 ≤ b_i < 2^{60}).

Output

If there are no valid permutations, print a single line containing "No".

Otherwise in the first line print the word "Yes", and in the second line print integers b'_1, …, b'_n — a valid permutation of integers b_i. The unordered multisets \\{b_1, …, b_n\} and \\{b'_1, …, b'_n\} should be equal, i. e. for each integer x the number of occurrences of x in the first multiset should be equal to the number of occurrences of x in the second multiset. Apart from this, the sequence a_i = b'_1 ⊕ … ⊕ b'_i should be strictly increasing.

If there are multiple answers, print any of them.

Examples

Input

3
1 2 3


Output

No


Input

6
4 7 7 12 31 61


Output

Yes
4 12 7 31 7 61 

Note

In the first example no permutation is valid.

In the second example the given answer lead to the sequence a_1 = 4, a_2 = 8, a_3 = 15, a_4 = 16, a_5 = 23, a_6 = 42.
import java.io.*;
import java.util.*;

public class VK_C implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            String filename = "";
            if (!filename.isEmpty()) {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            } else {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new VK_C().run();
//        new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    class Node {
        Node parent;

        Node(Node p) {
            parent = p;
        }

        Node zero;
        Node one;

        public Node getZero() {
            if (zero == null) return null;
            if (zero.size == 0) return null;
            return zero;
        }

        public Node getOne() {
            if (one == null) return null;
            if (one.size == 0) return null;
            return one;
        }

        int size;
    }

    Node root = new Node(null);

    void addNum(long x) {
        Node cur = root;
        for (int bit = WHOLE_BITS; bit >= 0; bit--) {
            boolean has = (x & (1L << bit)) != 0;
            if (has) {
                if (cur.getOne() == null) {
                    cur.one = new Node(cur);
                }
                cur = cur.one;
            } else {
                if (cur.zero == null) {
                    cur.zero = new Node(cur);
                }
                cur = cur.zero;
            }
            cur.size++;
        }
    }

    void remove(long x) {
        Node cur = root;
        for (int bit = WHOLE_BITS; bit >= 0; bit--) {
            boolean has = (x & (1L << bit)) != 0;
            if (has) {
                cur = cur.one;
            } else {
                cur = cur.zero;
            }
            cur.size--;
        }
    }

    long findValue(long curXor) {
        Node cur = root;
        int bit = WHOLE_BITS;
        while (cur.getZero() != null) {
            cur = cur.getZero();
            bit--;
        }
        long answer = 0;
        while (true) {
            if (cur == null) return -1;
            if (cur.getOne() == null || (curXor & (1L << bit)) == 0) {
                cur = cur.parent;
                bit++;
                continue;
            }
            answer |= 1L << bit;
            cur = cur.getOne();
            bit--;

            for (int b = bit; b >= 0; b--) {
                boolean has = (curXor & (1L << b)) != 0;
                if (has) {
                    if (cur.getZero() != null) {
                        cur = cur.getZero();
                    } else {
                        cur = cur.getOne();
                        answer |= 1L << b;
                    }
                } else {
                    if (cur.getOne() != null) {
                        cur = cur.getOne();
                        answer |= 1L << b;
                    } else {
                        cur = cur.getZero();
                    }
                }
            }
            return answer;
        }
    }

    int WHOLE_BITS = 60; //TOdO change to 60

    void solve() throws IOException {
        int n = readInt();
        long[] values = new long[n];
        long xor = 0;
        for (int i = 0; i < values.length; i++) {
            values[i] = readLong();
            addNum(values[i]);
            xor ^= values[i];
        }
        List<Long> ans = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            long chose = findValue(xor);
            if (chose == -1) {
                out.println("No");
                return;
            }
            remove(chose);
            xor ^= chose;
            ans.add(chose);
        }

        Collections.reverse(ans);
        out.println("Yes");
        for (long x : ans) out.print(x + " ");
    }

}



