Harryxun/stf_run huggingface dataset:
import math
a,b = map(int,input().split())
L = list(map(int,input().split()))
Le = [x for x in L if x%2 == 0]
Lo = [x for x in L if x%2 == 1]
#print(Le,Lo)
def nCr(n,r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
    
if b == 0:
    ev = 0
    od = 1
    while ev <= len(Le)//2:
        ev += nCr(len(Le),ev)
        ev += 2
    while od <= len(Lo)+1:
        od += nCr(len(Lo),od)
        od += 2
elif b == 1:
    ev = 0
    od = 0
    while ev <= len(Le)//2:
        ev += nCr(len(Le),ev)
        ev += 2
    while od <= len(Lo)+1:
        od += nCr(len(Lo),od)
        od += 2
print(ev*od)

### FIXED CODE ###

n,p = map(int,input().split())
L = list(map(int,input().split()))
Le = [x for x in L if x%2 == 0]
Lo = [x for x in L if x%2 == 1]

if p == 0:
    if len(Lo) == 0:
        print(2**n)
    else:
        print(2**(n-1))
if p == 1:
    if len(Lo) == 0:
        print(0)
    else:
        print(2**(n-1))
#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
c=int(0)
d=int(0)
for j in range(4):
  for i in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
    print(K,d+1)
    d=d+1
  c=c+1
    


### FIXED CODE ###

#ITP1_6_B


n= int(input())

T=[[0 for j in range(13)]for m in range(4)]
format(T)

for i in range(n):
    a,b = input().split()
    b=int(b)
    
    if a=='S':
      T[0][b-1] = 1
    elif a=='H':
      T[1][b-1] = 1
    elif a=='C':
      T[2][b-1] = 1
    else:
      T[3][b-1] = 1
for c in range(4):
  for d in range (13):
    if T[c][d] == 0:
      if c==0:
        K = "S"
      elif c==1:
        K = "H"
      elif c==2:
        K = "C"
      else:
        K = "D"
      print(K,d+1)
    else:
      pass
n,k=map(int,input().split())
x=list(map(int,input().split()))
time=float'inf'
for i in range(n-k+1):
  l=x[i]
  r=x[i+k-1]
  time=min(time,abs(l)+r-l,abs(r)+r-l)
print(time)
  
      
  


### FIXED CODE ###

n,k=map(int,input().split())
x=list(map(int,input().split()))
time=100000000000
for i in range(n-k+1):
  l=x[i]
  r=x[i+k-1]
  time=min(time,abs(l)+r-l,abs(r)+r-l)
print(time)
import numpy as np
listA=[]
lis=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
#print(listA)

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

X_=listA[0]
X=X_[0]
N=X_[1]
if N!=0:
    P =listA[1]

    arr = np.array(lis)
    P_max = max(P)
    P_min = min(P)   

    for i in range(P_max+1):
        lis.append(i)
    lis.remove(0)
    
    arr=arr[arr<=P_max]
    arr=arr[arr>=P_min]
    lis=arr.tolist()
    for p in P:
        lis.remove(p)
    #print(lis)
    lis_=[]
    for l in lis:
        lis_.append(abs(l-X))
    #print(lis_)
    lis_min=min(lis_)
    print(lis[my_index(lis_, lis_min)])
else:
    print(X)

### FIXED CODE ###

import numpy as np
lis=[]
for i in range(102):
    lis.append(i)
#print(lis)
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
#print(listA)
 
X_=listA[0]
X=X_[0]
N=X_[1]
if N!=0:
    P =listA[1]
 
    arr = np.array(lis)
    P_max = max(P)
    P_min = min(P)-1
    arr=arr[arr<=P_max+1]
    arr=arr[arr>=P_min-1]
    lis=arr.tolist()
    for p in P:
        lis.remove(p)
    #print(lis)
    lis_=[]
    for l in lis:
        lis_.append(abs(l-X))
    #print(lis_)
    lis_min=min(lis_)
 
    def my_index(l, x, default=False):
        if x in l:
            return l.index(x)
        else:
            return default
 
    print(lis[my_index(lis_, lis_min)])
else:
    print(X)
import numpy as np
K = int(input())
ans = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            ans += np.gcd.reduce([a, b, c])
print(ans)


### FIXED CODE ###

from math import gcd
K = int(input())
ans = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        for c in range(1, K+1):
            ans += gcd(gcd(a, b), c)
print(ans)
A=list(map(int, input().split()))
A.sort()
m=abs(A1-A2)
n=abs(A2-A3)
print(m+n)

### FIXED CODE ###

A=list(map(int, input().split()))
A.sort()
m=abs(A[0]-A[1])
n=abs(A[1]-A[2])
print(m+n)
n, k = map(int, input().split())
li = list(input().split())

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

### FIXED CODE ###

alpha = input()

if alpha.isupper():
  print('A')
elif alpha.islower():
  print('a')
import queue
N,M=map(int,input().split())
adj=[[] for _ in range(M+1)]
parent=[-1]*(N+1)
for i in range(M):
    A,B=map(int,input().split())
    adj[A].append(B)
    adj[B].append(A)
q=queue.Queue()
q.put((1,0))
while(not q.empty()):
    x,p=q.get()
    if parent[x]!=-1:
        continue
    parent[x]=p
    for next in adj[x]:
        if parent[next]==-1:
            q.put((next,x))
print('Yes')
for k in parent[2:]:
    print(k)

### FIXED CODE ###

import queue
N,M=map(int,input().split())
adj=[[] for i in range(N+1)]
parent=[-1] * (N+1)
for m in range(M):
    a,b=map(int,input().split())
    adj[a].append(b)
    adj[b].append(a)
q=queue.Queue()
q.put((1,0))
while(not q.empty()):
    x,p=q.get()
    if parent[x]!=-1:
        continue
    parent[x]=p
    for next in adj[x]:
        if parent[next]==-1:
            q.put((next,x))
print('Yes')
for p in parent[2:]:
    print(p)
import numpy as np
import math

N = int(input())

A = np.empty(N)
for i in range(N):
   A[i] = int(input())


max_a = np.max(A)
max_i = np.argmax(A)

for i in range(N):

   if(i == max_i):
      max_n0 = np.max(A[0:i-1)
      max_n1 = np.max(A[i+1,N-1)
      if(max_n0 > max_n1):
         print(max_n0)
      else:
         print(max_n1)
   else:
      print(max_a)


### FIXED CODE ###

import numpy as np
import math

N = int(input())

A = np.empty(N)
for i in range(N):
   A[i] = int(input())


max_a = np.max(A)
max_i = np.argmax(A)

for i in range(N):
   if(i == max_i):
      aa = np.sort(A)
      print(int(aa[-2]))
   else:
      print(int(max_a))
N, K = map(int,input().split())
p = list(map(int,input().split()))

#累積和を前計算
sum_list = [0 for _ in range(1001)]
sum = 0

for i in range(len(p)):
    sum += p[i]
    sum_list[i] = sum

#答えを計算
mev = 0
idx = 0
for i in range(N-K+1):
    ev = sum_list[i+K]-sum_list[i]
    if ev > mev:
        idx = i
        mev = ev

mev = 0
for i in range(idx+1,idx+1+K):
    mev += (p[i] + 1.0) / 2.0

print(mev)

### FIXED CODE ###

N, K = map(int,input().split())
p = list(map(int,input().split()))

#累積和を前計算
sum_list = [0 for _ in range(300000)]
sum = 0

for i in range(len(p)):
    sum += p[i]
    sum_list[i] = sum

#答えを計算
mev = 0
idx = 0
for i in range(N-K+1):
    ev = sum_list[i+K]-sum_list[i]
    if ev > mev:
        idx = i
        mev = ev

mev = 0.0
if N != K:
    for i in range(idx+1,idx+1+K):
        mev += (p[i] + 1.0) / 2.0

else:
    for i in range(len(p)):
        mev += (p[i] + 1.0) / 2.0

print(mev)
a, b = map(int, raw_input().split())
print(a*b,2*(a+b))

### FIXED CODE ###

a, b = map(int, input().split())
print(a*b,2*(a+b))
n,m=map(int, input().split(' '))
a = list(map(int, input().split()))
res = n-sum(a)
print(res if res >= 0 else -1

### FIXED CODE ###

n,m=map(int, input().split(' '))
a = list(map(int, input().split()))
res = n-sum(a)
print(res if res >= 0 else -1)
s = input()
K = int(input())
L = len(s)
cand = []

if L > 5:
    c = []
    order = sorted(list(s))
    for i in range(L):
        if order[i] in c:
            pass
        else:
            c.append(order[i])
            if len(c) == 5:
                break
else:
    c = list(s)

for i in range(L):
    if s[i] in c:
        for j in range(i+1,min(i+K+1,L+1)):
            cand.append(s[i:j])
cand.sort()

i = 0
if len(cand) == 1:
    print(cand[0])
    exit()
while True:
    if cand[i] == cand[i+1]:
        i+=1
        continue
    K-=1
    i+=1
    if K == 0:
        print(cand[i-1])
        break


### FIXED CODE ###

s = input()
K = int(input())
L = len(s)
cand = []

if L > 5:
    c = []
    order = sorted(list(s))
    for i in range(L):
        if order[i] in c:
            pass
        else:
            c.append(order[i])
            if len(c) == 5:
                break
else:
    c = list(s)

for i in range(L):
    if s[i] in c:
        for j in range(i+1,min(i+K+1,L+1)):
            cand.append(s[i:j])
cand.sort()

i = 0
if len(cand) == 1:
    print(cand[0])
    exit()

i = 0
while True:
    K -= 1
    if K == 0:
        print(cand[i])
        break
    i += 1
    while(cand[i] == cand[i-1]):
        cand.pop(i)
from statistics import mode
n = int(input())
a = list(input())
b = list(input())
c = list(input())
ans = 0
for i in range(n):
    k = [a[i], b[i], c[i]]
    if len(set(k)) != 3:
        flag = mode(k)
        ans += 3-k.count(flag)
    else:
        ans += 2

print(ans)


### FIXED CODE ###

n = int(input())
a = list(input())
b = list(input())
c = list(input())
ans = 0
for i in range(n):
    k = [a[i], b[i], c[i]]
    ans += len(set(k))-1

print(ans)
n,m = map(int,input().split())
dict = {}
sum = 0
kounyu = 0

for i in range(n):
  A,B = map(int,input().split())
  dict[A] = B

d = sorted(dict.items())

for i in range(n):
  if d[i][1] >= m - kounyu:
    print(sum + d[i][0]*(m - kounyu))
    exit()
    
  kounyu += d[i][1]
  sum += d[i][1]*d[i][0]

### FIXED CODE ###

n,m = map(int,input().split())
dict = {}
su = 0
kounyu = 0
 
for i in range(n):
  A,B = map(int,input().split())
  if A in dict:
    dict[A] += B  #同じAがありうる！！！！！！
  else:
    dict[A] = B
  

d = sorted(dict.items())
 
for i in range(10**99):
  if d[i][1] >= m - kounyu:
    print(su + d[i][0]*(m - kounyu))
    exit()
    
  kounyu += d[i][1]
  su += d[i][1]*d[i][0]
s = input()

sum = 0

l = ["+"] * (len(s) - 1)

n = 2 ** (len(s) - 1)

for i in range(n):
    l = ["+"] * (len(s) - 1)
    for j in range(len(l)):
        ls = list(s)
        if (i >> j) & 1:
            l[j] = ""
        for x in range(len(l)):
            
            ls.insert(2*x+1,l[x])
   
    

    maped_list = map(str, ls) 
    mojiretu = ''.join(maped_list)

    sum = sum + eval(mojiretu)

print(sum)
    



    
    
   





### FIXED CODE ###

s = input()

sum = 0

if len(s) > 1:

    l = ["+"] * (len(s) - 1)

    n = 2 ** (len(s) - 1)

    for i in range(n):
        l = ["+"] * (len(s) - 1)
        for j in range(len(l)):
            ls = list(s)
            if (i >> j) & 1:
                l[j] = ""
            for x in range(len(l)):
                
                ls.insert(2*x+1,l[x])
    
        

        maped_list = map(str, ls) 
        mojiretu = ''.join(maped_list)

        sum = sum + eval(mojiretu)

    print(sum)
else:
    print(s)
def main ():
N = int(input())
A = list(map(int,input(). split ()))
if 0 in A:
print(0)
return
prod = 1
for a in A:
prod *= a
if prod > 1000000000000000000:
print(-1)
return
print(prod)
main ()

### FIXED CODE ###

def main ():
  N = int(input())
  A = list(map(int,input(). split ()))
  if 0 in A:
    print(0)
    return
  prod = 1
  for a in A:
    prod *= a
    if prod > 1000000000000000000:
      print(-1)
      return
    
  print(prod)
main ()
n,m =int(input()).split(' ')
if(n==m):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n,m=input().split()
if(n==m):
  print("Yes")
else:
  print("No")
n = int(input())
p =[map(int,input().split())for i in range(n)]

m = max(p)/2
print(m+sum(p)-max(p))

### FIXED CODE ###

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

m = max(p)//2
print(m+sum(p)-max(p))
w,a,b=map(str,input().split())
if (w+a)<b:
  print(b-w-a)
else:
  print(0)

### FIXED CODE ###

w,a,b=map(int,input().split())
if (w+a)<b:
  print(b-w-a)
elif (b+w)<a:
  print(a-b-w)
else:
  print(0)
N,M= map(int, input().split())
A=list(map(int, input().split()))
A.sort()
A.reverse()
K=sum(A)
for i in range(0,N):
    if  A[i]>K/(4*M):
        continue
    else:
        answer=i+1
        break
if answer>=M:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N,M=map(int, input().split())
A=list(map(int, input().split()))
A.sort()
A.reverse()
K=sum(A)
answer=0
breakflag=0
for i in range(0,N):
  if  A[i]*M*4>=K:
    if i==N-1:
      breakflag=1
    continue
  else:
    answer=i
    break
if breakflag==1:
  answer=N
if answer>=M:
    print("Yes")
else:
    print("No")
K = int(input())

powlis = [pow(10, i, K) for i in range(K)]
for i in range(K-1):
    powlis[i+1] = (powlis[i] + powlis[i+1]) % K
    
print(lis[0:10])
if 0 in lis:
    print(lis.index(0)+1)
else:
    print(-1)

### FIXED CODE ###

K = int(input())

powlis = [7*pow(10, i, K) for i in range(K)]
for i in range(K-1):
    powlis[i+1] = (powlis[i] + powlis[i+1]) % K
powlis[0] %= K


try:
    print(powlis.index(0) + 1)
except:
    print(-1)
from sys import stdin
import math

# A = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().split()]
# print(A, B)


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


print(lcm(A, B))


### FIXED CODE ###

from sys import stdin
import fractions

A, B = [int(x) for x in stdin.readline().rstrip().split()]

print((A * B) // fractions.gcd(A, B))
x = map(int,raw_input().split())
for i in x
    print "case i : x"


### FIXED CODE ###

i=0
while 1:
      x = int(input())
      if x==0 : break
      i+=1
      print "Case %d: %d" %(i,x)
import string as st
from msvcrt import getch
string=[]
while True:
    s = input()
    if s == '':
        break
    string.append(s)
for i in range(len(st.ascii_lowercase)):
    print("{} : {}".format(st.ascii_lowercase[i],string.count(st.ascii_lowercase[i])))


### FIXED CODE ###

import string as st
string=[]
try:
    while True:
        s = input()#入力
        string =list(string)#list変換
        if not s :#空入力のときループぬける
            break
        string.extend(s)#list追加
        string=map(str,string)
        string="".join(string).lower()#str型変換と小文字
except EOFError:
    for i in range(len(st.ascii_lowercase)):
        print("{} : {}".format(st.ascii_lowercase[i],string.count(st.ascii_lowercase[i])))
s = input()
s[3] = '8'
print(s)

### FIXED CODE ###

s = input()
s = s.replace('2017', '2018')
print(s)
print(input()/3)

### FIXED CODE ###

print(int(int(input())/3))
while 1:
	n = input()
	if n == 0: break
	ans = {}
	for i in range(n):
		group,name = raw_input().split(":")
		if i == 0: first = group
		ans[group] = set(name[:-1].split(","))
		while 1:
			for key in ans:
				for key1 in ans:
					if key in ans[key1]:
						ans[key1] |= ans[key]
						ans[key1].discard(key)
						del ans[key]
						first = key
						break
				if key not in ans:
					break
			else:
				break
	print len(ans[first])

### FIXED CODE ###

while 1:
	n = input()
	if n == 0: break
	ans = {}
	for i in range(n):
		group,name = raw_input().split(":")
		if i == 0: first = group
		ans[group] = set(name[:-1].split(","))
	while 1:
		for key in ans:
			flag = 0
			if key == first: continue
			for key1 in ans:
				if key in ans[key1]:
					ans[key1] |= ans[key]
					ans[key1].discard(key)
					flag = 1
			if flag:
				del ans[key]
				break
		if flag == 0: break
	print len(ans[first])
N = int(input())
A = [int(x) for x in input().split()]
mod = 10**9+7
c = 1-N%2
flag = True
di = {}
if(N==1):
    if(A[0]==0):
        print(1)
    else:
        print(0)
else:
    for i in A:
        if(i not in di):
            di[i]=1
        else:
            di[i]+=1
    for i in range(N//2):
        if(i+c==0):
            flag &= (di[i]==1)
        else:
            flag &= (di[i*2+c]==2)
        if(not flag):
            print(0)
            break
    else:
        print((2<<(N//2-1))%mod)


### FIXED CODE ###

N = int(input())
A = [int(x) for x in input().split()]
mod = 10**9+7
c = 1-N%2
flag = True
di = {}
if(N==1):
    if(A[0]==0):
        print(1)
    else:
        print(0)
else:
    for i in A:
        if(i not in di):
            di[i]=1
        else:
            di[i]+=1
    for i in range(N//2):
        if(i+c==0):
            if(0 not in di):
                flag = False
            else:
                flag &= (di[i]==1)
        else:
            if(i*2+c not in di):
                flag = False
            else:
                flag &= (di[i*2+c]==2)
        if(not flag):
            print(0)
            break
    else:
        print((2<<(N//2-1))%mod)
N, K = map(int, input().split())
A = list( map(int, input().split()) ) #ここでN個受け取る

flags = [0] * 21000
nums = [0] * 21000

for i in range(N):
    flags[A[i]] = 1
    nums[A[i]] += 1
    
s_nums = sorted(nums)
count = 0
ans = 0

if sum(flags) - K > 0:
    for j in range(len(s_nums)):
        if s_nums[j] != 0 and count < sum(flags)-K:
            ans += s_nums[j]
            count += 1
            
    print(ans)
    
else :
    print(0)

### FIXED CODE ###

N, K = map(int, input().split())
A = list( map(int, input().split()) ) #ここでN個受け取る

var = [0] * (N+1)


for i in A:
    var[i] += 1
    
var = sorted(var,  reverse = True )


count = 0
for j in range( K, N+1 ):
    if var[j] == 0:
        break
    
    if var[j] != 0:
        count += var[j]
        
print(count)
import sys
n,y = map(int,input().split())

for i in range(n+1):
    for j in range(n-i+1):
        k = n-i-j:
        if (10000*i+5000*j+1000*k == y):
            print(i,j,k)
            sys.exit()
print(-1,-1,-1)


### FIXED CODE ###

import sys
n,y = map(int,input().split())

for i in range(n+1):
    for j in range(n-i+1):
        k = n-i-j
        if (10000*i+5000*j+1000*k == y):
            print(i,j,k)
            sys.exit()
print(-1,-1,-1)
t = input()
for i in range(len(t)):
    if t[i] == '?':
        t[i] = 'D'
print(t)

### FIXED CODE ###

print(input().replace('?','D'))
n, A, B, k = list(map(int, input().split()))

MOD = 998244353
MAX = 210000

fac = [0 for i in range(MAX)]
inv = [0 for i in range(MAX)]
ifac = [0 for i in range(MAX)]
fac[0] = 1; fac[1] = 1
inv[1] = 1
ifac[0] = 1; ifac[1] = 1

for i in range(2, MAX):
  fac[i] = fac[i-1]*i%MOD
  inv[i] = inv[MOD%i]*(MOD-MOD//i)%MOD
  ifac[i] = ifac[i-1]*inv[i]%MOD

def nCk(n, k):
  if n<k or n<0 or k<0: return 0
  return (((fac[n]*ifac[k])%MOD)*ifac[n-k])%MOD

ans = 0
for i in range(n+1):
  if (k-A*i)%B == 0:
    b = (k-A*i)//B
    if 0<=b<=n:
      ans = (ans+nCk(n, i)*nCk(n, b))%MOD

if ans==0:
  print(1)
else:
  print(ans)

### FIXED CODE ###

n, A, B, k = list(map(int, input().split()))

MOD = 998244353
MAX = n+2

fact, inverse = [0]*(MAX), [0]*(MAX)
fact[0], inverse[0] = 1, 1
for i in range(1, MAX):
  fact[i] = (fact[i-1]*i)%MOD
  inverse[i] = pow(fact[i], MOD-2, MOD)

def mod_comb(n, r):
  if n<r or n==0: return 0
  if r==0: return 1
  return (((fact[n]*inverse[r])%MOD)*inverse[n-r])%MOD

ans = 0
for i in range(n+1):
  if (k-A*i)%B == 0:
    b = (k-A*i)//B
    if 0<=b<=n:
      ans = (ans+mod_comb(n, i)*mod_comb(n, b))%MOD

if ans==0:
  print(1)
else:
  print(ans)
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
x=int(input())
dp=[0]*(x+1)
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
if x<=199:
    print(dp[x])
    exit()
for i in range(200,x+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
        dp[i]=1
print(dp[x])

### FIXED CODE ###

'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
x=int(input())
dp=[0]*(max(x+1,200))
dp[100]=1
dp[101]=1
dp[102]=1
dp[103]=1
dp[104]=1
dp[105]=1
if x<=199:
    print(dp[x])
    exit()
for i in range(200,x+1):
    if dp[i-100]==1 or dp[i-101]==1 or dp[i-102]==1 or dp[i-103]==1 or dp[i-104]==1 or dp[i-105]==1:
        dp[i]=1
print(dp[x])
#!/usr/bin/env python

N,M=input().split()
path=[]
all_list=[]
count=0

for i in range(M):
    path.append(map(int,raw_input().split()))

NN=N*(N-1)/2
all_list=map(list,permutations(range(NN),2))
for i in all_list[i]:
    for j in path[j]:
        if all_list[i]==path[j]:
            count=count+1

print count

### FIXED CODE ###

#!/usr/bin/env python

numbers = raw_input().split()

A = int(numbers[0])
B = int(numbers[1])

if A == B :
   print "Draw"
elif A == 1:
   print "Alice"
elif B == 1:
   print "Bob"
elif A > B:
   print "Alice"
elif B > A:
   print "Bob"
n=int(input())
alph=["A","C","G","T"]
a=[alph[i]+alph[j]+alph[k] for i in range(4) for j in range(4) for k in range(4)]
d1={l:0 for l in a}
for i in d1:
    if i!="AGC" and i!="ACG" and i!="GAC":
        d1[i]=1
d2={l:0 for l in a}
for i in range(n-3):
    for j in d1:
        next=[j+alph[k] for k in range(4)]
        for k in range(4):
            l=next[k]
            check1=l[1:]=="GAC" or l[1:]=="ACG" or l[1:]=="AGC"
            check2=l[1:]=="GAC" or l[1:]=="ACG" or l[1:]=="AGC"
            if (not check1) and (not check2)
                d2[l[1:]]+=d1[j]
    for j in d1:
        d1[j]=d2[j]%1000000007
        d2[j]=0
print(sum(d1.values())%1000000007)

### FIXED CODE ###

n=int(input())
alph=["A","C","G","T"]
a=[alph[i]+alph[j]+alph[k] for i in range(4) for j in range(4) for k in range(4)]
#print(len(a))
d1={l:0 for l in a}
for i in d1:
    if i!="AGC" and i!="ACG" and i!="GAC":
        d1[i]=1
d2={l:0 for l in a}
for i in range(n-3):
    for j in d1:
        next=[j+alph[k] for k in range(4)]
        for k in range(4):
            l=next[k]
            if l[1:]=="GAC" or l[1:]=="ACG" or l[1:]=="AGC":
                #print(l)
                pass
            elif l[0]=="A" and l[3]=="C" and (l[1]=="G" or l[2]=="G"):
                #rint(l)
                pass
            else:
                d2[l[1:]]+=d1[j]
    for j in d1:
        d1[j]=d2[j]
        d2[j]=0
print(sum(d1.values())%(1000000007))
X,Y = map(int,input().split())
Y = Y/2
z = Z + Y
print(z)

### FIXED CODE ###


# coding: utf-8

# In[1]:


x,y = map(int,input().split())


# In[2]:


y = y/2


# In[3]:


z = x + y


# In[8]:


print(int(z))
a=input().split()
if a[0]>a[1]:
    print("GREATER")
elif a[0]==a[1]:
    print("EQUAL")
else:
    print("LESS")

### FIXED CODE ###

a=int(input())
b=int(input())
if a>b:
    print("GREATER\n")
elif a==b:
    print("EQUAL\n")
else:
    print("LESS\n")
a, b = list(map(int, inout().split()));
ans = 0;
if a <= (b*2):
  ans = 0;
else:
  ans = a - (b*2);
  
print(ans);
  

### FIXED CODE ###

a, b = list(map(int, input().split()));
ans = 0;
if a > (b*2):
    ans = a - (b * 2);
print(ans);
x = int(input())
s = set([])
primes = [2,3,5,7,11,13,17,19,23,29,31]
for b in primes:
    for p in range(2,10):
        if b**p <= x:
            s.add(b**p)
        else:
            break
print(sorted(list(s))[-1])

### FIXED CODE ###

x = int(input())
s = set([1])
for b in range(32):
    for p in range(2,10):
        if b**p <= x:
            s.add(b**p)
print(sorted(list(s))[-1])
print(eval(input().replace(' ','*'))

### FIXED CODE ###

print(eval(input().replace(' ','*')))
N=int(input())
Ki=[list(map(int,input().split())) for i in range(N)]
f=False
for i in range(Ki):
  t,x,y=i
  s=x+y
  if (t%2==0 and s%2!=0) or (t%2!=0 and s%2==0) or t<s:
    f=True
    break
if f:
  print('No')
else:
  print('Yes')
  


### FIXED CODE ###

N=int(input())
Ki=[list(map(int,input().split())) for i in range(N)]
f=False
for i in Ki:
  t,x,y=i
  s=x+y
  if (t%2==0 and s%2!=0) or (t%2!=0 and s%2==0) or t<s:
    f=True
    break
if f:
  print('No')
else:
  print('Yes')
q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y): MAX=max(x)
else : MAX=max(y)

z=[0]*(MAX+1)

for k in x :
    z[k] += 1
    
for i in y :
    z[i] -= 1
    if z[i] == -1 :
        print('NO')
        exit()
        
print('YES')


### FIXED CODE ###


q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

dic = {}

for k in x :
    if k in dic.keys() :
        dic[k] += 1
    else :
        dic[k] = 1
    
for i in y :
    if i in dic.keys() :
        dic[i] -= 1
        if dic[i] == -1 :
            print('NO')
            exit()
    else :
        print('NO')
        exit()
print('YES')