N = int(eval(input()))

evenFlg = False

flg = False

lastIndex = int((N - (N % 2))/2)

if N % 2 == 0: evenFlg = True

ary = [2 for i in range(lastIndex)]

l = list(map(int, input().split()))

# for i in range(lastIndex):

#   ary.append(2)



if not evenFlg: ary.insert(0, 1)



for r in range(N):

    if evenFlg:

        l[r] = (l[r] - 1) / 2

    else:

        l[r] /= 2

    l[r] = int(l[r])

    ary[l[r]] -= 1

for k in range(lastIndex):

    if ary[k] != 0:

        flg = True

        break

ans = 0 if flg else (2**lastIndex) % (10**9 + 7)



print(ans)

N = int(eval(input()))

A = list(map(int, input().split()))

ans = pow(2, N // 2)

# 0*1 2*2 4*2 2^N/2*2

check = [0 for p in range(0, N // 2 + N % 2)]

for o in A:

    check[o // 2] += 1



for q in range(0, N // 2 + N % 2):

    if q == 0 and N % 2 == 1:

        if check[q] != 1:

            ans = 0

            break

    else:

        if check[q] != 2:

            ans = 0

            break

print((ans % (pow(10, 9) + 7)))
N = int(eval(input()))
evenFlg = False
flg = False
lastIndex = int((N - (N % 2)) / 2)
if N % 2 == 0:
    evenFlg = True
ary = [2 for i in range(lastIndex)]
l = list(map(int, input().split()))
# for i in range(lastIndex):
#   ary.append(2)
if not evenFlg:
    ary.insert(0, 1)
for r in range(N):
    if evenFlg:
        l[r] = (l[r] - 1) / 2
    else:
        l[r] /= 2
    l[r] = int(l[r])
    ary[l[r]] -= 1
for k in range(lastIndex):
    if ary[k] != 0:
        flg = True
        break
ans = 0 if flg else (2**lastIndex) % (10**9 + 7)
print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
ans = pow(2, N // 2)
# 0*1 2*2 4*2 2^N/2*2
check = [0 for p in range(0, N // 2 + N % 2)]
for o in A:
    check[o // 2] += 1
for q in range(0, N // 2 + N % 2):
    if q == 0 and N % 2 == 1:
        if check[q] != 1:
            ans = 0
            break
    else:
        if check[q] != 2:
            ans = 0
            break
print((ans % (pow(10, 9) + 7)))

-evenFlg = False -flg = False -lastIndex = int((N - (N % 2)) / 2) -if N % 2 == 0: -    evenFlg = True -ary = [2 for i in range(lastIndex)] -l = list(map(int, input().split())) -# for i in range(lastIndex): -#   ary.append(2) -if not evenFlg: -    ary.insert(0, 1) -for r in range(N): -    if evenFlg: -        l[r] = (l[r] - 1) / 2 +A = list(map(int, input().split())) +ans = pow(2, N // 2) +# 0*1 2*2 4*2 2^N/2*2 +check = [0 for p in range(0, N // 2 + N % 2)] +for o in A: +    check[o // 2] += 1 +for q in range(0, N // 2 + N % 2): +    if q == 0 and N % 2 == 1: +        if check[q] != 1: +            ans = 0 +            break -        l[r] /= 2 -    l[r] = int(l[r]) -    ary[l[r]] -= 1 -for k in range(lastIndex): -    if ary[k] != 0: -        flg = True -        break -ans = 0 if flg else (2**lastIndex) % (10**9 + 7) -print(ans) +        if check[q] != 2: +            ans = 0 +            break +print((ans % (pow(10, 9) + 7)))