line = eval(input())

X, Y = [int(n) for n in line.split()]



broken_steps = set()

for _ in range(Y):

    line = eval(input())

    broken_steps.add(int(line))



if 1 not in broken_steps:

    if 2 not in broken_steps:

        stairs = [1, 2]

    else:

        stairs = [1, 0]

elif 2 not in broken_steps:

    stairs = [0, 1]

else:

    stairs = [0, 0]



for i in range(2, X):

    number_of_steps = 0

    if i+1 not in broken_steps:

        number_of_steps = stairs[i - 1] + stairs[i-2]

    stairs.append(number_of_steps)

predicted_value = stairs[X-1]

print((predicted_value % 1000000007))
fib = [1,1,1,2]

def fibonacci(n):

    if n<len(fib):

        return fib[n]

    x = len(fib)

    a = fib[len(fib)-2]

    b = fib[len(fib)-1]

    while x<=n:

        c = b

        b = a+b

        a = c

        x+=1

    return b



h = input().split(" ")

n = int(h[0])

a = []

for i in range(n+1):

    a.append(1)



m = int(h[1])

for i in range(m):

    an = int(eval(input()))

    a[an]=0



prod=1

ck = 0

sum = 0



for i in range(n+1):

    if a[i]==0:

        if ck==1:

            prod =0

            break

        prod*=fibonacci(sum)

        sum=0

        ck=1

    else:

        sum+=1

        ck=0

prod*=fibonacci(sum)

print((prod%1000000007))
line = eval(input())
X, Y = [int(n) for n in line.split()]
broken_steps = set()
for _ in range(Y):
    line = eval(input())
    broken_steps.add(int(line))
if 1 not in broken_steps:
    if 2 not in broken_steps:
        stairs = [1, 2]
    else:
        stairs = [1, 0]
elif 2 not in broken_steps:
    stairs = [0, 1]
else:
    stairs = [0, 0]
for i in range(2, X):
    number_of_steps = 0
    if i + 1 not in broken_steps:
        number_of_steps = stairs[i - 1] + stairs[i - 2]
    stairs.append(number_of_steps)
predicted_value = stairs[X - 1]
print((predicted_value % 1000000007))

fib = [1, 1, 1, 2]


def fibonacci(n):
    if n < len(fib):
        return fib[n]
    x = len(fib)
    a = fib[len(fib) - 2]
    b = fib[len(fib) - 1]
    while x <= n:
        c = b
        b = a + b
        a = c
        x += 1
    return b


h = input().split(" ")
n = int(h[0])
a = []
for i in range(n + 1):
    a.append(1)
m = int(h[1])
for i in range(m):
    an = int(eval(input()))
    a[an] = 0
prod = 1
ck = 0
sum = 0
for i in range(n + 1):
    if a[i] == 0:
        if ck == 1:
            prod = 0
            break
        prod *= fibonacci(sum)
        sum = 0
        ck = 1
    else:
        sum += 1
        ck = 0
prod *= fibonacci(sum)
print((prod % 1000000007))

-line = eval(input()) -X, Y = [int(n) for n in line.split()] -broken_steps = set() -for _ in range(Y): -    line = eval(input()) -    broken_steps.add(int(line)) -if 1 not in broken_steps: -    if 2 not in broken_steps: -        stairs = [1, 2] +fib = [1, 1, 1, 2] + + +def fibonacci(n): +    if n < len(fib): +        return fib[n] +    x = len(fib) +    a = fib[len(fib) - 2] +    b = fib[len(fib) - 1] +    while x <= n: +        c = b +        b = a + b +        a = c +        x += 1 +    return b + + +h = input().split(" ") +n = int(h[0]) +a = [] +for i in range(n + 1): +    a.append(1) +m = int(h[1]) +for i in range(m): +    an = int(eval(input())) +    a[an] = 0 +prod = 1 +ck = 0 +sum = 0 +for i in range(n + 1): +    if a[i] == 0: +        if ck == 1: +            prod = 0 +            break +        prod *= fibonacci(sum) +        sum = 0 +        ck = 1 -        stairs = [1, 0] -elif 2 not in broken_steps: -    stairs = [0, 1] -else: -    stairs = [0, 0] -for i in range(2, X): -    number_of_steps = 0 -    if i + 1 not in broken_steps: -        number_of_steps = stairs[i - 1] + stairs[i - 2] -    stairs.append(number_of_steps) -predicted_value = stairs[X - 1] -print((predicted_value % 1000000007)) +        sum += 1 +        ck = 0 +prod *= fibonacci(sum) +print((prod % 1000000007))