Harryxun/stf_run huggingface dataset:
a, b = map(int, input().split())
print("Possible" if(a % 3 == 0 and b % 3 == 0 (a+b) % 3 == 0) else "Impossible")


### FIXED CODE ###

a, b = map(int, input().split())
sign = a % 3 == 0 or b % 3 == 0 or (a+b) % 3 == 0
print("Possible" if sign else "Impossible")
r = int(input())
print(r*r*3.141592,(r+r)*3.141592)


### FIXED CODE ###

from math import pi
r = float(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )
Kkk = int(input())  
String = str(input())
if len(String)==Kkk :
  print(String) 
else : 
  String.translate({ord(i): None for i in range(Kkk+1,len(String)-1)})
  print(String.append("..."))
    

### FIXED CODE ###

Kkk = int(input())  
String = str(input())
res=""
if len(String)>Kkk :
   for i in range (0,len(String)):
    if i<=Kkk-1:
      res=res+String[i]
   print(res+("..."))
else : 
  print(String)
order = list(input())
X, Y = map(int, input().split())

Xs = []
Ys = []
now_lis = Xs
cnt = 0
for s in order:
    if s=='T':
        now_lis.append(cnt)
        now_lis = Ys if now_lis==Xs else Xs
        cnt = 0
    else:
        cnt += 1
now_lis.append(cnt)
lx = len(Xs)
ly = len(Ys)
xdp = [[0]*16000 for _ in range(lx+1)]
ydp = [[0]*16000 for _ in range(ly+1)]
xdp[0][8000] = 1
ydp[0][8000] = 1

def dp(dp, lis, goal):
    for i, x in enumerate(lis, 1):
        for j in range(16000):
            if dp[i-1][j]==1:
                if not j+x>=16000:
                    dp[i][j+x] = 1
                if not j-x<0:
                    dp[i][j-x] = 1
    return dp[-1][goal+8000]

if dp(xdp, Xs, X) and dp(ydp, Ys, Y):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

order = list(input())
X, Y = map(int, input().split())
 
Xs = []
Ys = []
cnt = 0
now_lis = Xs
x_dir = 1
for s in order:
    if s=='T':
        if not cnt==0:
            now_lis.append(cnt)
        now_lis = Ys if x_dir else Xs
        x_dir = not x_dir
        cnt = 0
    else:
        cnt += 1
if not cnt==0:
    now_lis.append(cnt)

if order[0]=='T':
    x_start = 0
else:
    x_start = Xs[0]
    del Xs[0]

def dp(start, lis, goal):
    nodes = set([start])
    for x in lis:
        nx = set()
        L = list(nodes)
        for l in L:
            nx.add(l+x)
            nx.add(l-x)
        nodes = nx
    return goal in nodes
 
if dp(x_start, Xs, X) and dp(0, Ys, Y):
    print('Yes')
else:
    print('No')
N, M = map(int, input().split(" "))

cards = list(map(int, input().split(" ")))
cards.sort()

replaces = []
for _ in range(M):
	b, c = map(int, input().split(" "))
	replaces.append((c, b))

replaces.sort()
replaces.reverse()

#print(cards)
#print(replaces)

replace_index = 0
for c, b in replaces:
	ended = False
	for i in range(b):
		if cards[replace_index] < c:
			cards[replace_index] = c
			replace_index += 1
		else:
			ended = True
			break
	if ended:
		break

#print(cards)
print(sum(cards))


### FIXED CODE ###

N, M = map(int, input().split(" "))

cards = list(map(int, input().split(" ")))
cards.sort()

replaces = []
for _ in range(M):
	b, c = map(int, input().split(" "))
	replaces.append((c, b))

replaces.sort()
replaces.reverse()

#print(cards)
#print(replaces)

replace_index = 0
for c, b in replaces:
	ended = False
	for i in range(b):
		if replace_index >= N:
			ended = True
			break
		elif cards[replace_index] < c:
			cards[replace_index] = c
			replace_index += 1
		else:
			ended = True
			break
	if ended:
		break

#print(cards)
print(sum(cards))
I=input().split()
c5=0
c7=0

for i in I:
  if i=="5":
    c5+=1
  elif i=="7":
    c7+=1
if c5==2 and c7=1:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

I=input().split()
c5=0
c7=0

for i in I:
  if i=="5":
    c5+=1
  elif i=="7":
    c7+=1
if c5==2 and c7==1:
  print("YES")
else:
  print("NO")
N = int(input())
ans = 0
for i in range(1, N + 1):
	if len(i) % 2 == 1:
		ans += 1
print(ans)

### FIXED CODE ###

a,b,c=map(int,input().split())
s=c-min(c,a-b)
print(s)
n, m = input().split(" ")
# n, m = 100, 5

gacha = 1900 * m
state = 100 * (n-m)

res = (gacha + state) * 2**m

print(res)


### FIXED CODE ###

n, m = map(int, input().split(" "))
# n, m = 100, 5

gacha = 1900 * m
state = 100 * (n-m)

res = (gacha + state) * 2**m

print(res)
a, b = map(int, input().split())
if b < a:
  print(a-1)
else:
  pringt(a)

### FIXED CODE ###

a, b = map(int, input().split())
if b < a:
  print(a-1)
else:
  print(a)
N = int(input())
D = sorted([int(input()) for _ in range(N)])
i,prev = 1,D[0]
while i != (len(D)-1):
    if D[i] == prev: 
        D.pop(i)
    else:
        i +=1
        prev = D[i]
print(len(D))

### FIXED CODE ###

N = int(input())
D = sorted([int(input()) for _ in range(N)])
if len(D) > 1:
    i,prev = 0,None
    while i < (len(D)-1):
        if D[i] == D[i+1]: 
            D.pop(i+1)
        else:
            prev = D[i]
            i +=1
print(len(D))
#!/usr/bin/env python3
import sys

MOD = 1000000007  # type: int


def solve(N: int, M: int, a: "List[int]"):
    ways_to_stairs = {}
    stairs = []
    for i in range(N + 1):
        stairs.append(True)
    for i in a:
        stairs[i] = False

    routes_to_stairs = {0: 1}
    if 1 not in a:
        routes_to_stairs[1] = 1

    for i in range(N + 1):
        if i <= 1:
            continue
        if stairs[i]:
            ways = 0
            if stairs[i - 1]:
                ways += routes_to_stairs[i - 1]
            if stairs[i - 2]:
                ways += routes_to_stairs[i - 2]
        routes_to_stairs[i] = ways

    print(routes_to_stairs[N] % MOD)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    solve(N, M, a)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

sys.setrecursionlimit(10 ** 7)


MOD = 1000000007  # type: int


def solve(N: int, M: int, a: "List[int]"):
    ways_to_stairs = {}
    stairs = []
    for i in range(N + 1):
        stairs.append(True)
    for i in a:
        stairs[i] = False

    routes_to_stairs = {0: 1}
    if 1 not in a:
        routes_to_stairs[1] = 1

    for i in range(N + 1):
        if i <= 1:
            continue
        ways = 0
        if stairs[i]:
            if stairs[i - 1]:
                ways += routes_to_stairs[i - 1]
            if stairs[i - 2]:
                ways += routes_to_stairs[i - 2]
        routes_to_stairs[i] = ways

    print(routes_to_stairs[N] % MOD)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    a = [int(next(tokens)) for _ in range(M)]  # type: "List[int]"
    solve(N, M, a)

if __name__ == '__main__':
    main()
l = [int(input()) for i in range(5)]
k = int(input())
for i in itertools.combinations(l, 2):
  if i[1] - i[0] > k:
    print(':(')
    exit()
print('Yay!')

### FIXED CODE ###

import itertools
l = [int(input()) for i in range(5)]
k = int(input())
for i in itertools.combinations(l, 2):
  if i[1] - i[0] > k:
    print(':(')
    exit()
print('Yay!')
#C問題解説

n = int(input())  
chars = "Xabcdefghijklmnopqrstuvwxyz" # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします
n_rem = n  # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = "" #最終的な答え格納用

while True:
    x = n_rem % 26
    # 余りが0、つまりzの場合は、26にします
    if x == 0:
        x = 26
    #1番目(a)~26番目(z)から対応する文字を取ってく
    res += chars[x] 
    
    #xを引いて26で割る
    n_rem -= x
    if n_rem == 0:
        break
    
    n_rem // = 26

# 0桁目が先頭で、最後の桁が末尾になっているので、反転させます
print(res[::-1])

### FIXED CODE ###

n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします

n_rem = n  # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = ""

while True:
    x = n_rem % 26
    # 余りが0、つまりzの場合は、26にします
    if x == 0:
        x = 26
    res += chars[x]

    # xを引いて、26で割ります
    n_rem -= x

    # 0なら終了します
    if n_rem == 0:
        break

    n_rem //= 26

# 0桁目が先頭で、最後の桁が末尾になっているので、反転させます
print(res[::-1])
N=int(input())
S = {}
for i in range(N):
    let = input()
    try:
        S[let] += 1
    except:
        S[let] = 1
max_val = max(S.values())
answers = []
for k,v in S.items():
    if v == max_val:
        answers.append(k)
ansewrs.sort()
for ans in ansewrs:
    print(ans)

### FIXED CODE ###

N=int(input())
S = {}
for i in range(N):
    let = input()
    try:
        S[let] += 1
    except:
        S[let] = 1
max_val = max(S.values())
answers = []
for k,v in S.items():
    if v == max_val:
        answers.append(k)
answers.sort()
for ans in answers:
    print(ans)
money=int(input())
if(ceil(money/1000.0)==floor(money/1000.0)):
  print("0")
elif(ceil(money/1000.0)>floor(money/1000.0)):
  print(money%1000)
else:
  print(1000-(money%1000))
  

### FIXED CODE ###

import math as m
money=int(input())
if(m.ceil(money/1000.0)==m.floor(money/1000.0)):
  print("0")
elif(m.ceil(money/1000.0)<m.floor(money/1000.0)):
  print(money%1000)
else:
  print(1000-(money%1000))
s = input()
print(l)
count = 0
for i in l:
    if i == 1:
        count = count + 1
print(count)


### FIXED CODE ###

s = input()
l = [int(x) for x in list(str(s))]
count = 0
for i in l:
    if i == 1:
        count = count + 1
print(count)
H = int(input())
W = int(input())
N = int(input())

i = 0
j = 1

elif H > W:
    while i < N:
        i = (H * j) + i
        j = j + 1
elif H < W:
    while i < N:
        i = (W * j) + i
        j = j + 1
else:
    while i < N:
        i = (H * j) + i
        j = j + 1
print(j-1)


### FIXED CODE ###

H = int(input())
W = int(input())
N = int(input())

i = 0
j = 0
if H > W:
    while i < N:
        j = j + 1
        i = H + i
elif H < W:
    while i < N:
        j = j + 1
        i = W + i
else:
    while i < N:
        j = j + 1
        i = H + i
print(j)
a = list(map(int, input().split()))
#print(a)
b=[0]*1234567
c=[0]*1234567
b[0]=int(input())
c[0]=b[0]-0
for x in range(a[1]-1):
    b[x+1]=int(input())
    c[x+1]=b[x+1]-b[x]-1
c[-1]=a[0]-b[-1]
max = 0
min = a[0]+10000
for x in c:
    if x>max:
        max=x
    if x<min:
        min=x
        
#print(c)
#print(max," ",min)
if min==0:
    print(0)
else:
    num=[0]*1234567
    for x in range(max):
        if x==0:
            num[0]=1
        elif x==1:
            num[1]=1
        else:
            num[x]=num[x-1]+num[x-2]
        #print("num[",x,"]=",num[x])
        
    answer=1
    for x in c:
        answer *=num[x-1]
        if answer==0:
            print(0)
            break
        else:
            answer%=1000000007
    print(answer)


### FIXED CODE ###

n,m = list(map(int, input().split()))
a=[]
a.append(-1)
for x in range(m):
  tmp=int(input())
  a.append(tmp)
a.append(n+1)
diff = []
for x in range(len(a)-1):
  diff.append(a[x+1]-a[x])
              
large = 0
small = 123456789012345
for x in diff:
  large=max(large,x)
  small=min(small,x)

num=[0,0,1]
for _ in range(large):
  num.append((num[-1]+num[-2])%1000000007)
    
answer=1
for x in diff:
  #print(x,num[x])
  answer *=num[x]
  answer%=1000000007
print(answer)
N,K=(int(x) for x in input().split())
A=list(map(int, input().split()))
if K<=N:
    s=1
    for i in range(K):
        s=A[s-1]
    print(s)
else:
    s=1
    S={1}
    iloop=1
    while A[s-1] not in S:
        S.add(A[s-1])
        s=A[s-1]
        iloop=iloop+1
    p=s
    loop=0
    while A[s-1] != p:
        loop=loop+1
        s=A[s-1]
    g=(K-iloop)%loop+iloop
    s=1
    for i in range(g):
        s=A[s-1]
    print(s)


### FIXED CODE ###

N,K=(int(x) for x in input().split())
A=list(map(int, input().split()))
if K<=N:
    s=1
    for i in range(K):
        s=A[s-1]
    print(s)
else:
    s=1
    S={1}
    iloop=1
    while A[s-1] not in S:
        S.add(A[s-1])
        s=A[s-1]
        iloop=iloop+1
    p=s
    loop=1
    while A[s-1] != p:
        loop=loop+1
        s=A[s-1]
    g=(K-iloop)%loop+iloop
    s=1
    for i in range(g):
        s=A[s-1]
    print(s)
s = input()
if s[-1] != "s":
  print(s+'s')
elif s[-1] == 's' and s[-2] != 'e':
  print(s[:-1]+'es')
else:
    print(s)

### FIXED CODE ###

S = input()
if S[-1] == "s":
	print(S + "es")
else:
  	print(S + "s")
def gcd(a,b):
	if b == 0 :
		return a
	else :
		return gcd(b,a%b)

def lcm(a,b):
	return a*b/gcd(a,b)

n = int(input())
arr = []
for i in range(n):

	arr.append(int(input()))


def mlcm():

	ans = lcm(arr[0],arr[1])

	i = 2
	while i<n:
		ans = lcm(ans,arr[i])
		i+=1

	return ans

print mlcm()


### FIXED CODE ###

def gcd(a,b):
	if b == 0 :
		return a
	else :
		return gcd(b,a%b)
 
def lcm(a,b):
	return a*b/gcd(a,b)
 
n = int(input())
arr = []
for i in range(n):
 
	arr.append(int(input()))
 
 
def mlcm():
 	if n == 1:
 		return arr[0]

	ans = lcm(arr[0],arr[1])
 
	i = 2
	while i<n:
		ans = lcm(ans,arr[i])
		i+=1
 
	return ans
 
print mlcm()
import numpy as np

N = int(input())
ans = len(str(N))
for i in range(2, int(np.sqrt(N)) + 2):
    if not N % i:
        a = max(len(str(i)), len(str(int(N / i))))
        ans = min(ans, a)
print(a)

### FIXED CODE ###

import numpy as np
 
N = int(input())
ans = len(str(N))
for i in range(2, int(np.sqrt(N)) + 2):
    if not N % i:
        a = max(len(str(i)), len(str(int(N / i))))
        ans = min(ans, a)
print(ans)
christmas_day = 25
d = int(input())
print("Christmas", " Eve" * christmas_day - d)

### FIXED CODE ###

christmas_day = 25
d = int(input())
print("Christmas", " Eve" * (christmas_day - d))
def fib(n):
  if F[n] != 0:
    return F[n]
  elif n==0 or n==1:
    F[n] = 1
  else:
    F[n] = fib(n-1) + fib(n-2)

  return F[n]



n = input()
F = []
print fib(n)

### FIXED CODE ###

def fib(n):
  if F[n] != 0:
    return F[n]
  elif n==0 or n==1:
    F[n] = 1
  else:
    F[n] = fib(n-1) + fib(n-2)

  return F[n]



n = input()
F = [0 for row in range(n+1)]
print fib(n)
# -*- coding: utf-8 -*-
s = str(input())
for i in range(len(S) / 2):
  s.pop(2*i - 1)
print(s)

### FIXED CODE ###

# -*- coding: utf-8 -*-
S = str(input())
a=[]
for i in range(len(S)):
  if i % 2 == 0:
    a.append(S[i])
print("".join(a))
class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

h,w = map(int,input().split())

sl = []

for _ in range(h):
    s = list(input())
    sl.append(s)

uf = UnionFind(h*w)
for i in range(h):
    for j in range(w):
        if sl[i][j] != sl[i][j + 1]:
            if j+1 < w:
                uf.union(i*w+j, i*w+j+1)
        if sl[i][j] != sl[i + 1][j]:
            if i+1 < h:
                uf.union(i * w + j, i * w + j + w)

ans = 0
for group in uf.all_group_members().values():
    a = 0
    b = 0
    for p in group:
        i = p // w
        j = p % w
        if sl[i][j] == "#":
            a += 1
        else:
            b += 1
    ans += a*b

print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

h,w = map(int,input().split())

sl = []

for _ in range(h):
    s = list(input())
    sl.append(s)

used = [-1 for i in range(h*w)]
def dfs(i, j):
    used[i] = j
    if i % w + 1 < w:
        if sl[i//w][i%w] != sl[i//w][i%w+1]:
            if used[i+1] == -1:
                dfs(i + 1, j)
    if i % w - 1 >= 0:
        if sl[i//w][i%w] != sl[i//w][i%w-1]:
            if used[i-1] == -1:
                dfs(i - 1, j)
    if i // w + 1 < h:
        if sl[i // w][i % w] != sl[i // w+1][i % w]:
            if used[i+w] == -1:
                dfs(i + w, j)
    if i // w - 1 >= 0:
        if sl[i // w][i % w] != sl[i // w-1][i % w]:
            if used[i-w] == -1:
                dfs(i -w, j)

while True:
    if min(used) >= 0:
        break
    for i, j in enumerate(used):
        if j == -1:
            dfs(i, i)

from collections import defaultdict
dic = defaultdict(list)

for i, j in enumerate(used):
    dic[j].append(i)

ans = 0
for group in dic.values():
    a = 0
    b = 0
    for p in group:
        i = p // w
        j = p % w
        if sl[i][j] == "#":
            a += 1
        else:
            b += 1
    ans += a*b
print(ans)
import collections
n=int(input())
a=list(map(int,input().split()))
a=collections.Counter(a)
b,c=[],[]
for t in a:
  if a[t]==1:
    b.append(t)
  else:
    c.append(t)
if len(b) == 0:
  print(0)
  exit()
b.sort()
bm = b[-1]
ok = [True]*(bm+1)

for t in c:
  if ok[t] == False: continue
  i = 1
  while i*t<=bm:
    ok[i*t]=False
    i+=1
for t in b:
  if ok[t] == False: continue
  i = 2
  while i*t<=bm:
    ok[i*t]=False
    i+=1
ans = 0
for t in b:
  if ok[t]:
    ans+=1
print(ans)  

### FIXED CODE ###

import collections
n=int(input())
a=list(map(int,input().split()))
a=collections.Counter(a)
b,c=[],[]
for t in a:
  if a[t]==1:
    b.append(t)
  else:
    c.append(t)
if len(b) == 0:
  print(0)
  exit()
b.sort()
bm = b[-1]
ok = [True]*(bm+1)

if len(c)>0:
  c.sort()
  for t in c:
    if t>=bm: continue
    if ok[t] == False: continue
    i = 1
    while i*t<=bm:
      ok[i*t]=False
      i+=1
for t in b:
  if ok[t] == False: continue
  i = 2
  while i*t<=bm:
    ok[i*t]=False
    i+=1
ans = 0
for t in b:
  if ok[t]:
    ans+=1
print(ans)
(n,m) = [int(i) for i in input().split()]

A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])

b = []
for mc in range(m):
    b.append([int(input()))

product = []
for nc in range(n):
    total = 0
    for mc in range(m):
        total += A[nc][mc] * b[mc]

    product.append(total)

[print(p) for p in product]

### FIXED CODE ###

(n, m) = [int(i) for i in input().split()]
 
A = []
b = []
 
for i in range(n):
    A.append([int(j) for j in input().split()])
 
for i in range(m):
    b.append(int(input()))
 
 
for i in range(n):
    c = 0 
    for j in range(m):
         c += A[i][j] * b[j]
    print(c)
import sys
X, N = map(int, input().split())
if (N==0):
    print(100)
    sys.exit()
p = list(map(int, input()))

n_ans = 1
sa = 100
for k in range(1,100,1):
    if (k in p):
        continue
    if(abs(k-X) < sa):
        n_ans = k
        sa = abs(k-X)
    else:
        break
print(n_ans)

### FIXED CODE ###

import sys
X, N = map(int, input().split())
if (N==0):
    print(X)
    sys.exit()
p = list(map(int, input().split()))

n_ans = 0
sa = 200
for k in range(0,102,1):
    if (k in p):
        continue
    if(abs(k-X) < sa):
        n_ans = k
        sa = abs(k-X)
    else:
        break
print(n_ans)
A,B,C = map(int,input().split())

print('YES' if C % gcd(A,B) == 0 else 'NO')

### FIXED CODE ###

import math

A,B,C = map(int,input().split())

print('YES' if C % math.gcd(A,B) == 0 else 'NO')
s=input()
k=int(input())
if s[0]!='1':
  print(s[0])
else:
  pos=0
  for i in range(len(s)):
    if i!=s[:i].count('1'):
      break
    pos=i
  if k<=pos:
    print('1')
  else:
    print(s[pos+1])

### FIXED CODE ###

s=input()
k=int(input())
if s[0]!='1':
  print(s[0])
else:
  pos=0
  for i in range(len(s)):
    if i!=s[:i].count('1'):
      break
    pos=i
  if k<=pos:
    print('1')
  else:
    print(s[pos])
n = input()
A = map(int, raw_input().split())
Q = input()
f = {0}
f[1] = 1
m = map(int, raw_input().split())

for i in range(n):
    j = 2000
  while 0 < j:  
    if(j + A < 2000 && f[j + 1] == 1):
      f[j + A + 1] == 1
    j- = 1

for i in range(Q)
    if(f[m] == 1):
    print "yes"
  else:
    print "no"

### FIXED CODE ###

n = int(raw_input())
A = map(int,raw_input().split())
Q = int(raw_input())
m = map(int,raw_input().split())

def s(i, m):
  if m == 0:
    return True
  if i >= n or m > sum(A):
    return False
  r = s(i + 1, m) or s(i + 1, m - A[i])
  return r

for j in range(Q):
  if s(0, m[j]):
    print "yes"
  else:
    print "no"
q=int(input())
for i in range(q):
  a,b=map(int,input().split())
  h=0
  for j in range(a,b+1):
    for v in range(2,round(j**0.5)):
      if j%v==0:
        for k in range(2,round(((j+1)/2)**0.5)):
          if j%k==0:
            h+=1
          else:
            pass
      else:
        pass
      
  print(h)
        

### FIXED CODE ###

n=int(input())
print(48-n)
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    counter = collections.Counter(A)
    keys = [False]*(N+1)
    keys[(N - 1) % 2] = True
    for n in range(1, N//2+1):
        keys[((N - 1) % 2)+2*n] = True
    if N % 2 != 0 and counter[0] != 1:
        print(0)
        exit()

    cnt = 0
    for k, v in counter.items():
        if k == 0: continue
        if not keys[k] or v != 2:
            print(0)
            exit()
        cnt += 1

    print((N // 2) * cnt)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()
    cnt = collections.Counter(A)

    for k, v in cnt.items():
        if k == 0 and v != 1:
            print(0)
            exit()
        elif k != 0 and v != 2:
            print(0)
            exit()
    print((2 ** (N // 2))%MOD)


if __name__ == '__main__':
    main()