You are given an undirected graph consisting of *n* vertices and <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/674d9858011b0046ef87a26aa39f2b9cac65bfac.png" style="max-width: 100.0%;max-height: 100.0%;"/> edges. Instead of giving you the edges that exist in the graph, we give you *m* unordered pairs (*x*, *y*) such that there is no edge between *x* and *y*, and if some pair of vertices is not listed in the input, then there is an edge between these vertices.

You have to find the number of connected components in the graph and the size of each component. A connected component is a set of vertices *X* such that for every two vertices from this set there exists at least one path in the graph connecting these vertices, but adding any other vertex to *X* violates this rule.
The first line contains two integers *n* and *m* (1 ≤ *n* ≤ 200000, <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/281a6739c6f74c0372a4f47d5c23a7f33b6f01d3.png" style="max-width: 100.0%;max-height: 100.0%;"/>).

Then *m* lines follow, each containing a pair of integers *x* and *y* (1 ≤ *x*, *y* ≤ *n*, *x* ≠ *y*) denoting that there is no edge between *x* and *y*. Each pair is listed at most once; (*x*, *y*) and (*y*, *x*) are considered the same (so they are never listed in the same test). If some pair of vertices is not listed in the input, then there exists an edge between those vertices.
none
5 5
1 2
3 4
3 2
4 2
2 5
2
1 4 
8 15
2 1
4 5
2 4
3 4
2 5
3 5
2 6
3 6
5 6
4 6
2 7
3 8
2 8
3 7
6 7
1
8 
12 58
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 10
1 11
1 12
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
3 4
3 5
3 6
3 7
3 8
3 9
3 10
3 11
3 12
4 5
4 6
4 8
4 11
4 12
5 6
5 7
5 8
5 9
5 10
5 11
6 7
6 8
6 9
6 10
6 11
6 12
7 8
7 9
7 10
7 11
7 12
8 9
8 10
8 11
9 10
9 11
9 12
10 12
4
1 1 1 9 
5 7
1 2
2 3
3 4
1 5
2 5
3 5
4 5
2
1 4 
6 10
1 2
1 3
1 4
1 6
2 3
2 4
2 5
3 5
3 6
4 6
1
6 
8 23
1 2
1 4
1 6
1 8
2 3
2 4
2 5
2 6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2
4 5
9 2
10 1
5 7
1 5
9 7
2 11
8 6
3 9
2 5
9 5
6 5
1 4
11 9
1 7
8 10
3 6
3 7
11 5
6 9
4 10
8 7
4 9
8 2
4 2
8 11
7 4
9 10
8 1
10 7
3 2
5 8
8 9
1 3
2 7
10 11
5 3
10 5
4 11
1 11
8 3
5
1 1 1 2 6 
import java.util.*;
import java.io.*;
import java.math.*;
import java.lang.*;

public class Main {
    private static FastReader sc = new FastReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);
    private static HashMap<Integer, HashSet<Integer>> graph;
    private static boolean[] marked;
    private static HashSet<Integer> unvis = new HashSet<>();

    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        graph = new HashMap<>();
        for (int i = 0; i < n; i++) graph.put(i, new HashSet<>());
        for (int i = 0; i < m; i++) {
            int u = sc.nextInt() - 1;
            int v = sc.nextInt() - 1;
            graph.get(u).add(v);
            graph.get(v).add(u);
        }

        marked = new boolean[n];
        for (int i = 0; i < n; i++) unvis.add(i);
        ArrayList<Integer> ans = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (unvis.contains(i)) {
                ans.add(bfs(i));
            }
        }
        Collections.sort(ans);
        out.printLine(ans.size());
        for (int i : ans) out.print(i + " ");
        out.printLine();
        out.close();
    }

    private static int bfs(int s) {
        int size = 1;
        Queue<Integer> q = new LinkedList<>();
        q.add(s);
        marked[s] = true;
        unvis.remove(s);
        while (!q.isEmpty()) {
            int u = q.remove();
            HashSet<Integer> vis = new HashSet<>();
            for (int v : unvis) {
                if (!graph.get(u).contains(v)) {
                    size++;
                    q.add(v);
                    marked[v] = true;
                    vis.add(v);
                }
            }
            unvis.removeAll(vis);
        }
        return size;
    }
}

class DSU {
    int[] id, sz;
    int n;
    int comp;

    public DSU(int n) {
        id = new int[n];
        sz = new int[n];
        comp = n;
        this.n = n;
        for (int i = 0; i < n; i++) {
            id[i] = i;
            sz[i] = 1;
        }
    }

    private int root(int i) {
        while (i != id[i]) {
            id[i] = id[id[i]];
            i = id[i];
        }
        return i;
    }

    public boolean connected(int u, int v) {
        return root(u) == root(v);
    }

    public void union(int u, int v) {
        if (connected(u, v)) return;
        int pid = root(u);
        int qid = root(v);
        if (sz[pid] <= sz[qid]) {
            id[pid] = id[qid];
            sz[qid] += sz[pid];
        } else {
            id[qid] = id[pid];
            sz[pid] += sz[qid];
        }
        comp--;
    }
}

class FastReader {
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1) {
            throw new InputMismatchException();
        }
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0) {
                return -1;
            }
        }

        return buf[curChar++];
    }

    public int peek() {
        if (numChars == -1) {
            return -1;
        }
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                return -1;
            }
            if (numChars <= 0) {
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c == ',') {
                c = read();
            }
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null) {
            return filter.isSpaceChar(c);
        }
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0() {
        StringBuilder buf = new StringBuilder();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r') {
                buf.appendCodePoint(c);
            }
            c = read();
        }
        return buf.toString();
    }

    public String nextLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines) {
        if (ignoreEmptyLines) {
            return nextLine();
        } else {
            return readLine0();
        }
    }

    public BigInteger nextBigInteger() {
        try {
            return new BigInteger(nextString());
        } catch (NumberFormatException e) {
            throw new InputMismatchException();
        }
    }

    public char nextCharacter() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return (char) c;
    }

    public double nextDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E') {
                return res * Math.pow(10, nextInt());
            }
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted() {
        int value;
        while (isSpaceChar(value = peek()) && value != -1)
            read();
        return value == -1;
    }

    public String next() {
        return nextString();
    }

    public SpaceCharFilter getFilter() {
        return filter;
    }

    public void setFilter(SpaceCharFilter filter) {
        this.filter = filter;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

    public void flush() {
        writer.flush();
    }

}