{"raw_statement":[{"iden":"statement","content":"You are given a set of $n$ segments on the axis $Ox$, each segment has integer endpoints between $1$ and $m$ inclusive. Segments may intersect, overlap or even coincide with each other. Each segment is characterized by two integers $l_i$ and $r_i$ ($1 \\le l_i \\le r_i \\le m$) — coordinates of the left and of the right endpoints.\n\nConsider all integer points between $1$ and $m$ inclusive. Your task is to print all such points that don't belong to any segment. The point $x$ belongs to the segment $[l; r]$ if and only if $l \\le x \\le r$."},{"iden":"input","content":"The first line of the input contains two integers $n$ and $m$ ($1 \\le n, m \\le 100$) — the number of segments and the upper bound for coordinates.\n\nThe next $n$ lines contain two integers each $l_i$ and $r_i$ ($1 \\le l_i \\le r_i \\le m$) — the endpoints of the $i$\\-th segment. Segments may intersect, overlap or even coincide with each other. Note, it is possible that $l_i=r_i$, i.e. a segment can degenerate to a point."},{"iden":"output","content":"In the first line print one integer $k$ — the number of points that don't belong to any segment.\n\nIn the second line print exactly $k$ integers in _any_ order — the points that don't belong to any segment. All points you print should be distinct.\n\nIf there are no such points at all, print a single integer $0$ in the first line and either leave the second line empty or do not print it at all."},{"iden":"examples","content":"Input\n\n3 5\n2 2\n1 2\n5 5\n\nOutput\n\n2\n3 4 \n\nInput\n\n1 7\n1 7\n\nOutput\n\n0"},{"iden":"note","content":"In the first example the point $1$ belongs to the second segment, the point $2$ belongs to the first and the second segments and the point $5$ belongs to the third segment. The points $3$ and $4$ do not belong to any segment.\n\nIn the second example all the points from $1$ to $7$ belong to the first segment."}],"translated_statement":[{"iden":"statement","content":"给定数轴 $O x$ 上的 $n$ 个线段，每个线段的端点均为介于 $1$ 到 $m$ 之间的整数。线段之间可能相交、重叠甚至完全重合。每个线段由两个整数 $l_i$ 和 $r_i$（$1 lt.eq l_i lt.eq r_i lt.eq m$）表示，分别为左端点和右端点。\n\n考虑所有介于 $1$ 到 $m$ 之间的整数点。你的任务是输出所有不属于任何线段的点。点 $x$ 属于线段 $[ l \\; r ]$ 当且仅当 $l lt.eq x lt.eq r$。\n\n输入的第一行包含两个整数 $n$ 和 $m$（$1 lt.eq n, m lt.eq 100$），分别表示线段的数量和坐标的上界。\n\n接下来的 $n$ 行，每行包含两个整数 $l_i$ 和 $r_i$（$1 lt.eq l_i lt.eq r_i lt.eq m$），表示第 $i$ 个线段的端点。线段之间可能相交、重叠甚至完全重合。注意，可能存在 $l_i = r_i$，即线段可能退化为一个点。\n\n第一行输出一个整数 $k$ —— 不属于任何线段的点的数量。\n\n第二行输出恰好 $k$ 个整数（顺序任意）—— 所有不属于任何线段的点。你输出的所有点必须互不相同。\n\n如果不存在这样的点，则第一行仅输出整数 $0$，第二行可以留空，或完全不输出。"},{"iden":"input","content":"输入的第一行包含两个整数 $n$ 和 $m$（$1 lt.eq n, m lt.eq 100$），分别表示线段的数量和坐标的上界。接下来的 $n$ 行，每行包含两个整数 $l_i$ 和 $r_i$（$1 lt.eq l_i lt.eq r_i lt.eq m$），表示第 $i$ 个线段的端点。线段之间可能相交、重叠甚至完全重合。注意，可能存在 $l_i = r_i$，即线段可能退化为一个点。"},{"iden":"output","content":"第一行输出一个整数 $k$ —— 不属于任何线段的点的数量。第二行输出恰好 $k$ 个整数（顺序任意）—— 所有不属于任何线段的点。你输出的所有点必须互不相同。如果不存在这样的点，则第一行仅输出整数 $0$，第二行可以留空，或完全不输出。"},{"iden":"examples","content":"输入\n3 5\n2 2\n1 2\n5 5\n输出\n2\n3 4\n\n输入\n1 7\n1 7\n输出\n0"},{"iden":"note","content":"在第一个例子中，点 $1$ 属于第二个线段，点 $2$ 属于第一个和第二个线段，点 $5$ 属于第三个线段。点 $3$ 和 $4$ 不属于任何线段。在第二个例子中，从 $1$ 到 $7$ 的所有点都属于第一个线段。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n, m \\in \\mathbb{Z}^+ $ with $ 1 \\leq n, m \\leq 100 $.  \nLet $ S = \\{ [l_i, r_i] \\mid i \\in \\{1, \\dots, n\\} \\} $ be a set of closed integer intervals, where $ 1 \\leq l_i \\leq r_i \\leq m $ for all $ i $.  \nLet $ U = \\{1, 2, \\dots, m\\} $ be the universal set of integer points.\n\n**Constraints**  \nFor each segment $ [l_i, r_i] \\in S $:  \n- $ l_i, r_i \\in \\mathbb{Z} $  \n- $ 1 \\leq l_i \\leq r_i \\leq m $\n\n**Objective**  \nCompute the set $ R = U \\setminus \\bigcup_{i=1}^n [l_i, r_i] $, i.e., the set of integer points in $ \\{1, \\dots, m\\} $ not covered by any segment.  \n\nOutput:  \n- The cardinality $ k = |R| $,  \n- The elements of $ R $, in any order, if $ k > 0 $.","simple_statement":null,"has_page_source":false}