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. 

Consider 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$.


-----Input-----

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.

The 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.


-----Output-----

In the first line print one integer $k$ — the number of points that don't belong to any segment.

In 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.

If 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.


-----Examples-----
Input
3 5
2 2
1 2
5 5

Output
2
3 4 

Input
1 7
1 7

Output
0




-----Note-----

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.

In the second example all the points from $1$ to $7$ belong to the first segment.

Difficulty: introductory

Starter code:

Solutions:
def mi():
	return map(int, input().split())

n,m = mi()
a = [0]*m
for i in range(n):
	l,r = mi()
	for i in range(l-1, r):
		a[i] = 1
print (a.count(0))
for i in range(m):
	if a[i]==0:
		print (i+1, end = ' ')

n,m=map(int,input().split())
ar=[0]*m
for i in range(n):
    a,b=map(int,input().split())
    for e in range(a-1,b):
        ar[e]=1
ans=[]
for i in range(m):
    if(ar[i]==0):
        ans.append(i+1)
print(len(ans))
print(*ans)

n, m = map(int, input().split())
z = set(range(1, m + 1))
for u in range(n):
    x, y = map(int, input().split())
    for i in range(x, y + 1):
        z.discard(i)
print(len(z))
for i in z:
    print(i, end = ' ')


n, m = map(int, input().split())
num = []
for i in range(n):
    l, r = map(int, input().split())
    num.append([l, r])
ans = []
for i in range(1, m + 1):
    for j in range(n):
        if num[j][0] <= i and num[j][1] >= i:
            break
    else:
        ans.append(i)
print(len(ans))
if ans:
    print(*ans)

#      
import collections, atexit, math, sys
from functools import cmp_to_key
#key=cmp_to_key(lambda x,y: 1 if x not in y else -1 )

sys.setrecursionlimit(1000000)
def getIntList():
    return list(map(int, input().split()))    

import bisect 
try :
    #raise ModuleNotFoundError
    import numpy
    def dprint(*args, **kwargs):
        print(*args, **kwargs, file=sys.stderr)
    dprint('debug mode')
except ModuleNotFoundError:
    def dprint(*args, **kwargs):
        pass


def memo(func):  
    cache={}  
    def wrap(*args):  
        if args not in cache:  
            cache[args]=func(*args)  
        return cache[args]  
    return wrap

@memo
def comb (n,k):
    if k==0: return 1
    if n==k: return 1
    return comb(n-1,k-1) + comb(n-1,k)

inId = 0
outId = 0
if inId>0:
    dprint('use input', inId)
    sys.stdin = open('input'+ str(inId) + '.txt', 'r') #标准输出重定向至文件
if outId>0:
    dprint('use output', outId)
    sys.stdout = open('stdout'+ str(outId) + '.txt', 'w') #标准输出重定向至文件
    atexit.register(lambda :sys.stdout.close())     #idle 中不会执行 atexit
    
N, M= getIntList()
zz = set()
for i in range(N):
    l,r = getIntList()
    for j in range(l,r+1):
        zz.add(j)
print(M-len(zz))
for i in range(1,M+1):
    if i not in zz:
        print(i,end = ' ')









n,m=map(int,input().split())
s=[]
ans=[]
for i in range(n):
    s.append(list(map(int,input().split())))
for i in range(1,m+1):
    t=True
    for j in s:
        if i>=j[0] and i<=j[1]:
            t=False
            break
    if t:
        ans.append(i)
print(len(ans))
for i in ans:
    print(i,end=" ")


import math as ma
from decimal import Decimal as dec


def li():
	return list(map(int , input().split()))


# https://www.geeksforgeeks.org/multiplicative-inverse-under-modulo-m/
def modInverse(a , m):
	m0 = m
	y = 0
	x = 1
	if (m == 1):
		return 0
	while (a > 1):
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if (x < 0):
		x = x + m0
	return x

m=10000019
def binomialCoefficient(n , k):
	if (k > n - k):
		k = (n - k)%m
	res = 1
	for i in range(k):
		res = (res * (n - i))%m
		res = (res * modInverse((i + 1),m))%m
	return res


def num():
	return map(int , input().split())


def nu():
	return int(input())


def find_gcd(x , y):
	while (y):
		x , y = y , x % y
	return x


n,m=num()
a=[0]*(m)
for ii in range(n):
	l,r=num()
	for i in range(l-1,r):
		a[i]=1
c=0
ll=[]
for i in range(m):
	if(a[i]==0):
		c+=1
		ll.append(i+1)
print(c)
print(*ll,sep=" ")

import sys, math, random
from fractions import gcd
from itertools import permutations

debug = 0
if debug:
    f = open("input.txt", "r")
    input = f.readline
else:
    input = sys.stdin.readline

def mp():
    return list(map(int, input().split()))

def _main():
    n, m = mp()
    a = [0] * n
    for i in range(n):
        a[i] = mp()
    ans = []
    for i in range(1, m + 1):
        t = False
        for j in a:
            if j[0] <= i and j[1] >= i:
                t = True
        if t == False:
            ans.append(i)
    print(len(ans))
    print(*ans)
_main()


a = [False,] * 110
b = []
ans = 0
n, m = map(int, input().split())

for i in range(n):
    l, r = map(int, input().split())
    while l <= r:
        a[l] = True
        l += 1

for i in range(1, m + 1):
    if not a[i]:
        b.append(i)
        ans += 1

print(ans)
print(*b)

n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
ans = 0
answ = []
for i in range(1, m + 1):
    flag = False
    for elem in a:
        flag |= elem[0] <= i <= elem[1]
    ans += not flag
    if not flag:
        answ.append(i)
print(ans)
print(*answ)

def go():
    n, m = [int(i) for i in input().split(' ')]
    x = [0] * (m + 1)
    for i in range(n):
        a = [int(i) for i in input().split(' ')]
        for i in range(a[0], a[1] + 1):
            x[i] = 1
    o = ''
    c = 0
    for i in range(1, len(x)):
        if x[i] == 0:
            o += '{} '.format(i)
            c += 1
    print(c)
    return o.strip()
print(go())


n, m = map(int, input().split())
otr = []
for i in range(n):
    otr.append([int(j) for j in input().split()])
answer = 0
s = []
for i in range(1, m+1):
    Ok = True
    for j in range(n):
        if otr[j][0] <= i and otr[j][1] >= i:
            Ok = False
    if Ok:
        s.append(i)
        answer+=1
print(answer)
print(' '.join(map(str, s)))

n, m = map(int, input().split())
a = [0]*(m+1)
for i in range(n):
    l, r = map(int, input().split())
    while l!=r+1:
        a[l] = 1
        l+=1

print(a.count(0)-1)
for i in range(1,m+1):
    if a[i]==0:
        print(i, end = ' ')

n, m = map(int, input().split())
seg = [0] * (m + 1)
seg[0] = 1
for i in range(n):
    a, b = map(int, input().split())
    for j in range(a, b + 1):
        seg[j] = 1

rec = []
for i in range(m + 1):
    if seg[i] != 1:
        rec.append(i)

print(len(rec))
print(" ".join(map(str, rec)))

n, m = map(int, input().split())
a = [i for i in range(1, m+1)]

for _ in range(n):
    l, r = map(int, input().split())
    for x in range(l, r+1):
        if x in a:
            a.remove(x)

print(len(a))
print(*a)

n, m = list(map(int, input().split()))
all = set(range(1, m + 1))
for i in range(n):
	l, r = list(map(int, input().split()))
	for j in range(l, r + 1):
		all.discard(j)

print(len(all))
print(*all)


n, m = map(int, input().split())
s = []
k = 0
ans = []
for i in range(n):
    l, r= map(int,input().split())
    s.append((l ,r))
for i in range(1, m + 1):
    flag = True
    for j in range(n):
        if s[j][0] <= i <= s[j][1]:
            flag = False
    if flag:
        k = k + 1
        ans.append(i)
print(k, end=' \n')
for i in range(k):
    print(ans[i], end=' ')

[n,m] = [int(i) for i in input().split()]

arr = [0]*m

for i in range(n):
    [s,e] = [int(i) for i in input().split()]
    for i in range(s,e+1):
        arr[i-1] = 1

out = []
for i in range(m):
    if arr[i] == 0:
        out.append(i+1)

print(len(out))
for i in out:
    print(i, end=" ")
print()


n, m = [int(i) for i in input().split()]
f = [True] * (m + 1)
f[0] = False  
for i in range(n):
    p, q = [int(j) for j in input().split()]
    for j in range(p, q + 1):
        f[j] = False
print(sum(f))
for i in range(1, m + 1):
    if f[i]:
        print(i, end = " ")
print()



n, m = map(int, input().split())
a = list(range(1, m+1))
for i in range(n):
    l, r = map(int, input().split())
    for x in range(l, r+1):
        if x in a: a.remove(x)
print(len(a))
for x in a:
    print(x, end=" ")


n, m = list(map(int, input().split()))
remain = set(range(1, m + 1))
for _ in range(n):
    l, r = list(map(int, input().split()))
    for i in range(l, r + 1):
        remain.discard(i)

print(len(remain))
print(*sorted(remain))



s = input().split(" ")
n,m = int(s[0]),int(s[1])
visit = [0 for i in range(m+1)]
for i in range(n):
	s = input().split(" ")
	l,r = int(s[0]),int(s[1])
	for i in range(l,r+1):
		visit[i] = 1
res = []
for i in range(1,m+1):
	if visit[i] == 0:
		res.append(i)
print(len(res))
for i in res:
	print(i,end=" ")

# from math import ceil
#from sys import stdout

t = 1#int(input())
for test in range(1,t+1):
    n,m = list(map(int, input().split()))
    ans = []
    count = 0
    D = {}
    for i in range(n):
        l,r = list(map(int, input().split()))
        for j in range(l, r+1):
            D[j] = 1
    for i in range(1, m+1):
        if i not in D:
            count+=1
            ans.append(i)
    print(count)
    print(*ans)






    


import sys
n, m = map(int, sys.stdin.readline().split())
tab = [False]*m
for loop in range(n):
    d, f = map(int, sys.stdin.readline().split())
    for i in range(d-1, f, 1):
        tab[i] = True
out = list()
r = 0
for loop in range(m):
    if not tab[loop]:
        r+=1
        out.append(loop+1)
print(r)
print(*out)

n, m = list(map(int, input().split()))
used_points = [False] * (m + 1)
for ind in range(n):
    l, r = list(map(int, input().split()))
    for point in range(l, r + 1):
        used_points[point] = True

count_not_used = 0
res = ''
for point in range(1, m + 1):
    if not used_points[point]:
        count_not_used += 1
        res += str(point) + ' '

print(count_not_used)
print(res)