Harryxun/stf_run huggingface dataset:
N=int(input())
A=[int(x)for x in input().split()]
B=[]
if N%2==0:
    for i in range((N//2)):
        B.append(2*i+1)
        B.append(2*i+1)
    if sorted(A)==sorted(B):
        ans=(2**(N/2))%(10**9+7)
    else:
        ans=0
else:
    B.append(0)
    for i in range(1,((N-1)//2)+1):
        B.append(2*i)
        B.append(2*i)
    if sorted(A)==sorted(B):
        ans=(2**((N-1)/2))%(10**9+7)
    else:
        ans=0
print(int(ans))

        
    

### FIXED CODE ###

mod = 10**9 + 7
n = int(input())
a = sorted(list(map(int,input().split())))
 
if n % 2 == 0:
  for i in range(n//2):
    if not a[2*i] == a[2*i+1] == 2*i+1:
      print(0)
      exit()
else:
  if a[0] != 0:
    print(0)
    exit()
  for i in range(n//2):
    if not a[2*i+1] == a[2*i+2] == 2*i+2:
      print(0)
      exit()
print(pow(2, n//2) % mod)
a,b,k=map(int,input().split());r=range(a,b+1)
for i in r:
  if i not in set(r[k:-k]):
    print(i)

### FIXED CODE ###

print("YNeos"[set(input())!=set("abc")::2])
N = int(input())
AB = [list(map(int,input().split())) for _ in range(N)]

MOD = 1000000007
from collections import defaultdict
dd = defaultdict(int,{})
for a,b in AB:
  dd[-b/a] += 1
  
ans = 0
N -= 1
for a,b in AB:
  if N - dd[a/b]>=0:
    ans += pow(2,(N - dd[a/b]),MOD)
    ans %= MOD
  dd[-b/a] -= 1
  N -= 1
  
print(ans%MOD) 

### FIXED CODE ###

def main():
  from math import gcd
  from collections import defaultdict
  import sys
  input = sys.stdin.readline
  N = int(input())
  AB = [list(map(int,input().split())) for _ in range(N)]

  MOD = 10**9 + 7

  zero_zero_count = 0
  zero_one_count = 0
  one_zero_count = 0
  dd_ba = defaultdict(int, {})
  for a,b in AB:
    if (a==0)and(b==0):
      zero_zero_count += 1
    elif (a==0):
      zero_one_count += 1
    elif (b==0):
      one_zero_count += 1
    else:
      if a * b < 0:
        a = abs(a)
        b = abs(b)
        g = gcd(a, b)
        dd_ba[(b//g, a//g)] += 1
      else:
        a = abs(a)
        b = abs(b)
        g = gcd(a, b)
        dd_ba[(-b//g, a//g)] += 1

  ans = (2**zero_one_count + 2**one_zero_count -1)
  dd_flag = defaultdict(bool, {})

  for key,value in tuple(dd_ba.items()):
    if dd_flag[key]:
      continue
    
    key_0 = key[0]
    key_1 = key[1]
    if key_0<0:
      x = (key_1, -key_0)
    else:
      x = (-key_1, key_0)
    y = dd_ba[x]
    ans *= (2**y + 2**value - 1) % MOD
    ans %= MOD
    dd_flag[x] = True

  ans += zero_zero_count - 1
  print(ans%MOD) 

if __name__=='__main__':
  main()
a = int(input())
b = list(map(int, input().split()))
flag = True
for i in range(len(b)):
  if i%2==1:
    if b[i]%!=0 or b[i]%5!=0:
      flag = False
      
if flag == True:
  print("APPROVED")
else:
  print("DENIED")

### FIXED CODE ###

a = int(input())
b = list(map(int, input().split()))
flag = True
for i in range(len(b)):
  if b[i]%2==0:
    if b[i]%3!=0 and b[i]%5!=0:
      flag = False
      
if flag == True:
  print("APPROVED")
else:
  print("DENIED")
import math
a,b,c = map(int, input().split())
r = math.gcd(a,b)
if c % r == 0:
    print('YES')
else:
    print('NO')
    


### FIXED CODE ###

from fractions import gcd
a,b,c = map(int, input().split())
r = gcd(a,b)
if c % r == 0:
    print('YES')
else:
    print('NO')
N = int(input())

nodes = []
edge = []
for i in range(N):
    nodes.append([])

for i in range(N-1):
    a, b = [int(v) - 1 for v in input().split(' ')]
    if a >= len(nodes):
        exit()
    if b >= len(nodes):
        exit()
    nodes[a].append((b, i))
    nodes[b].append((a, i))
    edge.append(0)

max_l = 0
max_i = 0
for i, links in enumerate(nodes):
    if links is None:
        exit()
    l = len(links)
    if max_l < l:
        max_l = l
        max_i = i

def fill(nodes, links, edge, pc):
    c = 1
    if pc == c:
        c += 1

    for n, i in links:
        if n < 0 or i < 0:
            exit()
        if n >= len(nodes) or i >= len(edge):
            exit()

        if edge[i] != 0:
            continue
        edge[i] = c
        fill(nodes, nodes[n], edge, c)

        c += 1
        if pc == c:
            c += 1

    
fill(nodes, nodes[max_i], edge, 0)

print(max_l)
for e in edge:
    print(e)



### FIXED CODE ###

N = int(input())

nodes = []
edge = []
for i in range(N):
    nodes.append([])

for i in range(N-1):
    a, b = [int(v) - 1 for v in input().split(' ')]
    if a >= len(nodes):
        exit()
    if b >= len(nodes):
        exit()
    nodes[a].append((b, i))
    nodes[b].append((a, i))
    edge.append(0)

max_l = 0
max_i = 0
if nodes is None:
    exit()

for i, links in enumerate(nodes):
    if links is None:
        exit()
    l = len(links)
    if max_l < l:
        max_l = l
        max_i = i

def fill(nodes, edge, queue):
    while len(queue) > 0:
        ni, pc = queue.pop(0)
        links = nodes[ni]

        c = 1
        if pc == c:
            c += 1

        if links is None:
            exit()

        next_links = []
        for n, i in links:
            if n < 0 or i < 0:
                exit()
            if n >= len(nodes) or i >= len(edge):
                exit()

            if edge[i] != 0:
                continue
            edge[i] = c
            queue.append((n, c))

            c += 1
            if pc == c:
                c += 1

queue = [(max_i, 0)]    
fill(nodes, edge, queue)

print(max_l)
for e in edge:
    print(e)
import sys
sys.setrecursionlimit(1000000000)
def times(h,kp):
    if h==1:
        return 1
    else:
        if h >= 10**9:
            return 1+2*times(int(h//2),kp)
        elif kp[h]==0:
            kp[h]=1+2*times(int(h//2),kp)
            return kp[h]
        else:
            return kp[h]
        
H=int(input())
kp=[0]*10**9
print(times(H,kp))

### FIXED CODE ###

#

import sys
input=sys.stdin.readline

def main():
    H=int(input())
    cnt=0
    ans=0
    while(H>1):
        H=int(H//2)
        ans+=2**cnt
        cnt+=1
    ans+=2**cnt
    print(ans)
    
    
    
if __name__=="__main__":
    main()
# -*- coding: utf-8 -*-
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


N = int(readline())
S = [int(x) - ord("A") for x in read().rstrip]
N = int(readline())

S = [(x + N) % 26 for x in S]

anser = "".join(chr(x + ord("A")) for x in S)

print(anser)


### FIXED CODE ###

N = int(input())
S = input()

out = ""
for i in S:
    tmp = (ord(i) + N) % 91
    if tmp < 65:
        tmp = tmp + 65
    out = out + chr(tmp)

print(out)
N,A,B,C,D=map(int,input().split())
S=input()
if C<D and B<C:
    for i in range(A-1,D-2):
        if S[i]=='#' and S[i+1]=='#':
            print('No')
            exit()
    print('Yes')
    exit()
elif C<D and B>C:
    for i in range(A-1,C-2):
        if S[i] == '#' and S[i + 1] == '#':
            print('No')
            exit()
    for p in range(B-1,D-2):
        if S[p] == '#' and S[p + 1] == '#':
            print('No')
            exit()
    print('Yes')
    exit()
elif C>D:
    for j in range(A-1,D-2):
        if S[j]=='#' and S[j+1]=='#':
            print('No')
            exit()
    if any(S[k-1]=='.' and S[k]=='.' and S[k+1]=='.' for k in range(B-1,D-1)):
        print('Yes')
        exit()
        
elif 
print('No')


### FIXED CODE ###

N,A,B,C,D=map(int,input().split())
S=input()
if C<B and B<D:#パターンその1
    for i in range(A-1,C-1):
        if S[i] == '#' and S[i + 1] == '#':
            print('No')
            exit()
    for p in range(B-1,D-1):
        if S[p] == '#' and S[p + 1] == '#':
            print('No')
            exit()
    print('Yes')
    exit()
elif B<C and C<D:#パターンその2
    for i in range(A-1,D-1):
        if S[i]=='#' and S[i+1]=='#':
            print('No')
            exit()
    print('Yes')
    exit()
elif D<C:#パターンその3
    for j in range(A-1,C-1):
        if S[j]=='#' and S[j+1]=='#':
            print('No')
            exit()
    if any(S[k-1]=='.' and S[k]=='.' and S[k+1]=='.' for k in range(B-1,D)):
        print('Yes')
        exit()
print('No')
d = map(int, input().split()).sort()

sorted(d.items(), key=lambda x: x[1])

### FIXED CODE ###

ary=list(map(int, input().split()))
ary.sort()
print("{} {} {}".format(ary[0], ary[1], ary[2]))
N = int(input())
if int(N/10)==9:
        print("Yes")
    elif int(((N-9)%10)) == 0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

N = int(input())
if int(N/10)==9:
    print("Yes")
elif int(((N-9)%10)) == 0:
    print("Yes")
else:
    print("No")
n,x,t=map(int,input().split())

p=n//x

if t%p==0:
  print(t*p)
else:
  print(t*(p+1))

### FIXED CODE ###

n,x,t=map(int,input().split())

p=n//x

if n%x==0:
  print(t*p)
else:
  print(t*(p+1))
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

N=I()
A=LI()
B = []
counts = collections.Counter(A)
for count in counts:
    if counts[count] >= 2:
        B.append(count)
B.sort(reversed=True)
if len(B) < 2:
    print(0)
else:
    print(B[0]*B[1])
    

### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

N=I()
A=LI()
B = []
counts = collections.Counter(A)
for count in counts.items():
    if count[1] >= 2:
        B.append(count)
B.sort(reverse=True)
if len(B) ==0:
    print(0)
elif len(B) == 1:
    if B[0][1] >= 4:
        print(B[0][0]**2)
    else:
        print(0)
else:
    if B[0][1] >= 4:
        print(B[0][0]**2)
    else:
        print(B[0][0]*B[1][0])
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
answer = ls[K]
 print(answer)

### FIXED CODE ###

#! /usr/bin/env python3
# -*- coding: utf-8 -*-

A,B,K = [int(x) for x in input().split()]
ls =[i for i in range(1,A+1) if A % i == 0 and B % i == 0]
ls.reverse()
answer = ls[K-1]
print(answer)
S = input()
t = ["x" for i in range(len(s))]
print(*t)

### FIXED CODE ###

S = input()
t = ["x" for i in range(len(S))]
print("".join(t))
import numpy as np
N = int(input())
if N < 2:
  Ans = 1
else:
  n = N % 2
  AB = [N]
  if n == 0:
    ni = N //2 -1
  else:
    ni = N //2
  for i in range(ni):
    ab = AB[-1] - 2
    AB.append(ab)
  Ans = str(np.prod(AB))
Ans = list(reversed(Ans))
ans = []
for i in range(len(Ans)):
  if Ans[i] == '0':
    ans.append(i)
  else:
    break
print(len(ans))

### FIXED CODE ###

import numpy as np
N = int(input())
n2 = N % 2
if n2 != 0:
  ans = 0
elif N <= 2:
  ans =0
else:
  a = int(np.log(N) // np.log(5))
  A = [N // (2 * (5 ** (i + 1))) for i in range(a)]
  ans = np.sum(A)
print(ans)
A,B,C,D,E,F = [int(x) for x in input().split()]
#%%
x = []
y = []
ans_max = 0
ans = []

for i in range(F//(100*A)+1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*(A*i+B*j)
        if(water<=F and not water in x):
            x.append(water)

for i in range(F):
    for j in range(F):
        salt = C*i+D*j
        if(salt<=F and not salt in y):
            y.append(salt)

for i in x:
    for j in y:
        if(i==0):
            break
        elif(100*j < i*E and i+j <= F):
            percent = 100*j/(i+j)
            if(ans_max < percent):
                ans_max = percent
                ans = [i,j]

print(sum(ans),ans[1])


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000000)
A,B,C,D,E,F = [int(x) for x in input().split()]

x = []
y = []
ans_max = 0
ans = [0,0]

for i in range(F//(100*A)+1):
    for j in range((F-100*A*i)//(100*B)+1):
        water = 100*(A*i+B*j)
        if(water<=F and not water in x and water!=0):
            x.append(water)

ans[0]=x[0]

for i in range(F):
    for j in range(F):
        salt = C*i+D*j
        if(salt<=F and not salt in y):
            y.append(salt)

for i in x:
    for j in y:
        if(i==0):
            continue
        elif(100*j <= i*E and i+j <= F):
            percent = 100*j/(i+j)
            if(ans_max < percent):
                ans_max = percent
                ans = [i,j]

print(sum(ans),ans[1])
N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(0, K-N):
  if A[K+i] ＞ A[i]:
    print('Yes')
  else:
    print('No')


### FIXED CODE ###

N, K =map(int, input().split())
A = list(map(int, input().split()))
for i in range(N-K):
    if A[K+i] > A[i]:
        print('Yes')
    else:
        print('No')
N, T = map(int, input().split())
weight = []
value = []

dp = [[0] * (3010) for i in range(3010)]

for i in range(N):
    w, v = map(int, input().split())
    weight.append(w)
    value.append(v)
#配る
for i, (ww, vv) in enumerate(zip(weight, value)):
    for w in range(T):
        if i == 0:
            print(ww, vv)
            
        dp[i+1][w] = max(dp[i+1][w], dp[i][w])
        dp[i+1][w+ww] = max(dp[i][w+ww], dp[i][w] + vv)
        #else: dp[i+1][w] = dp[i][w]


print(max(dp[N]))
"""
for i, v in enumerate(dp[N][:200]):
    print("{}:{}, ".format(i, v), end="")
"""


### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()

def main():
    N, T = map(int, input().split())
    cv = [tuple(map(int, input().split())) for _ in range(N)]
    cv = sorted(cv, key=lambda x : x[0])

    dp = [[0]*(T+1) for _ in range(N+1)]
    dp_ext = [[0]*(T+1) for _ in range(N+1)]

    values = [v for c, v in cv]
    max_values = [max(values[i:]) for i in range(N)]
    # 貰うdp
    for i in range(N):
        cost, value = cv[i]
        for now in range(cost, T+1):
            old = now - cost
            dp[i+1][now] = max(dp[i][now], dp[i][old] + value)

        for j in range(1, T+1):
            dp[i+1][j] = max(dp[i+1][j], dp[i+1][j-1])
        
        for j in range(1, T+1):
            dp_ext[i+1][j] = max(dp[i+1][j], dp[i][j-1] + max_values[i], dp_ext[i][j])

    print(dp_ext[N][T])

if __name__ == "__main__":
    main()
t = open(0)[0][:-1]
keep = True
keeped_ones = 0
n0 = 0
ones = [] # (number of zeros before 1, is_odd)
for i, x in enumerate(t):
    if x == '0':
        n0 += 1
        keep = True
    elif x == '1':
        if keep:
            ones.append((n0, (i+1)%2))
            keep = False
        else:
            keeped_ones += 1
            ones = ones[:-1]
            keep = True

ans = keeped_ones * n0
for n0_before, is_odd in ones:
    ans += (n0_before + is_odd)//2 + (n0 - n0_before)
ans += (keeped_ones + (len(ones)+1)//2) * (keeped_ones + len(ones)//2 + 1)
print(ans)

### FIXED CODE ###

t = input()
before_is_zero = True
keeped_ones = 0
n0 = 0
ones = [0] * int(1e5+1) # (number of zeros before 1, is_odd)
ones_index = 0
for i, x in enumerate(t):
    if x == '0':
        n0 += 1
        before_is_zero = True
    elif x == '1':
        if before_is_zero:
            ones[ones_index] = (n0, (i+1)%2)
            ones_index += 1
            before_is_zero = False
        else:
            keeped_ones += 1
            ones_index -= 1
            before_is_zero = True

if before_is_zero:
    if len(ones) > 0:
        ones = ones[:-1]

ans = keeped_ones * n0
for i in range(ones_index):
    n0_before, is_odd = ones[i]
    ans += (n0_before + is_odd)//2 + (n0 - n0_before)
ans += (keeped_ones + (ones_index+1)//2) * (keeped_ones + ones_index//2 + 1)
print(ans)
S = input()
T = input()

j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)

### FIXED CODE ###

S = input()
T = input()
count = 0
j =0
for i in S:
  if i != T[j]:
    count +=1
  j+=1

print(count)
c500 = int(input)
c100 = int(input)
c50 = int(input)
x = int(input)
count = 0

for c500_n in range(1, c500):
  for c100_n in range(1, c100):
    for c50_n in range(1, c50):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1

print(count)

### FIXED CODE ###

c500 = int(input())
c100 = int(input())
c50 = int(input())
x = int(input())
count = 0
 
for c500_n in range(c500+1):
  for c100_n in range(c100+1):
    for c50_n in range(c50+1):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1
 
print(count)
N = int(input())
A = list(map(int,input().split()))
count = 0

for i in range((N+2)//2):
    if A[2*i ] % 2 == 1:
        count += 1

print(count)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
count = 0

if N % 2 ==0:
    for i in range((N+2)//2 - 1):
        if A[2*i ] % 2 == 1:
            count += 1
else:
    for i in range((N+2)//2):
        if A[2*i ] % 2 == 1:
            count += 1

print(count)
#!/usr/bin/env python3

def main():
    import sys
    def I(): return int(sys.stdin.readline())
    def LI(): return list(map(int,sys.stdin.readline().split()))

    n = I()
    V = []
    W = []
    m = min(n, 1 << 10)
    maxL = 10**5
    dp = [[0]*(maxL + 1)]
    
    for i in range(1, n+1):
        v, w = LI()
        V.append(v)
        W.append(w)
        half = i >> 1
        dp_ = dp[half][:]
        if i <= m:
            for j in range(w, maxL+1)[::-1]:
                if dp_[j] < dp_[j - w] + v:
                    dp_[j] = dp_[j - w] + v
            dp.append(dp_)
    
    q = I()
    for i in range(q):
        v, L = LI()
        if v <= m:
            print(dp[v][L])
        else:
            cnt = 0
            v_ = []
            w_ = []
            while v > m:
                v_.append(V[v-1])
                w_.append(W[v-1])
                v >>= 1
                cnt += 1
            ret = dp[v-1][L]
            v_tmp = [0] * (1 << cnt)
            w_tmp = [0] * (1 << cnt)
            for b in range(1, 1 << cnt):
                lsb = b & -b
                l = lsb.bit_length()
                w_tmp[b] = w_tmp[b - lsb] + w_[l-1]
                if w_tmp[b] <= L:
                    v_tmp[b] = v_tmp[b - lsb] + v_[l-1]
                    ret = max(ret, v_tmp[b] + dp[v-1][L - w_tmp[b]])
            print(ret)

if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3

def main():
    import sys
    def I(): return int(sys.stdin.readline())
    def LI(): return list(map(int,sys.stdin.readline().split()))

    n = I()
    V = []
    W = []

    maxL = 10**5
    m = min(n, 1 << 10)
    dp = [[0]*(maxL + 1)]
    
    for i in range(n):
        v, w = LI()
        if i <= m:
            d_ = dp[(i+1)>>1][:]
            for j in range(w, maxL+1)[::-1]:
                d_[j] = max(d_[j], d_[j - w] + v)
            dp.append(d_)
        V.append(v)
        W.append(w)
    
    q = I()
    for i in range(q):
        v, L = LI()
        if v <= m:
            print(dp[v][L])
            continue
        cnt = 0
        v_ = []
        w_ = []
        while v > m:
            v_.append(V[v-1])
            w_.append(W[v-1])
            v >>= 1
            cnt += 1
        ret = dp[v][L]
        v_tmp = [0] * (1 << cnt)
        w_tmp = [0] * (1 << cnt)
        for b in range(1, 1 << cnt):
            lsb = b & -b
            l = lsb.bit_length()
            w_t = w_tmp[b - lsb] + w_[l-1]
            w_tmp[b] = w_t
            if w_t <= L:
                v_t = v_tmp[b - lsb] + v_[l-1]
                v_tmp[b] = v_t
                ret = max(ret, v_t + dp[v][L - w_t])
        print(ret)
    return

if __name__ == "__main__":
    main()
N, x = map(int, input().split())
A = [int(i) for i in input().split()]

A.sort()
ans = []
for i in A:
	if x < i:
		break
	ans += 1
	x -= i

else:
	if x > 0:
		ans -= 1
print(ans)



### FIXED CODE ###

n, x = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
ans = 0
for a in A:
    x -= a
    if x >= 0:
        ans += 1
    else:
        break
if x > 0:
    ans -= 1
print(ans)
a = int(input().split)

c = int(a*b)

if(c%2==0)
   print("Even")
  else
   print("Odd")

### FIXED CODE ###

a,b = map(int, input().split())

if ((a*b)%2==0):
    print('Even')
else:
    print('Odd')
n = int(raw_input())
maxv = int(raw_input())
minv = int(raw_input())
maxv = -10**9

for j in range(0,n-1):
   nums = int(raw_input())
   deff = nums - minv
   if maxv < deff:
     maxv = deff
   if minv > nums:
     minv = nums
print maxv

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9
  
for j in range(n-1):
  nums = int(raw_input())  
  diff = nums - minv
  if maxv < diff:
    maxv = diff
  if nums < minv:
    minv = nums
  
print maxv
import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a=b=0:break
    print(a,b)

### FIXED CODE ###

import sys
for c in sys.stdin:
    a,b=sorted(map(int,c.split()))
    if a+b==0:break
    print(a,b)
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(2000000)

    N,M = map(int,input().split())
    edges = [[]for _ in range(N+1)]
    for _ in range(M):
        a,b = map(int,input().split())
        edges[a].append(b)
        edges[b].append(a)

    colors = [-1]*(N+1)
    def paint(n,p,c):
        ret = 1
        if colors[n]!=-1 and colors[n]!=c:
            ret = 0
        else:
            colors[n] = c
            for nx in edges[n]:
                if nx != p:
                    ret = min(ret,paint(nx,n,(c+1)%2))
        return ret

    def choose(n,k):
        import math
        return math.factorial(n)//(math.factorial(n-k)*math.factorial(k))
    res = paint(1,0,1)
    if res == 0:
        ans = choose(N,2)-M
    else:
        ans = colors.count(0)*(N-colors.count(0))-M

    print(ans)

main()


### FIXED CODE ###

"""
グラフが二部グラフかどうかを判定する。
二部グラフであれば、AグループのノードとBグループのノード同士をそれぞれ結ぶことができる。
二部グラフでない場合、すべてのノード同士を結ぶことができる。
"""
import math
from collections import Counter
import sys
sys.setrecursionlimit(200000)
def choose(n):
    return math.factorial(n)//(math.factorial(n-2)*math.factorial(2))
N,M = map(int,input().split())
edges = [[]for _ in range(N+1)]
for _ in range(M):
    A,B = map(int,input().split())
    edges[A].append(B)
    edges[B].append(A)

colors = [-1]*(N+1)
def f(n,p):
    c = colors[n]
    for v in edges[n]:
        if v != p:
            if colors[v] == -1:
                colors[v] = 1 if c==0 else 0
                f(v,n)
            elif colors[v] == c:
                print(choose(N)-M)
                exit()
colors[1]=0
f(1,0)
count1 = colors.count(0)
count2 = colors.count(1)
print(count1*count2-M)
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
num=[]
for i in range(100000):
    num.append(A.count(i))

total=sum(A)
for i in range(Q):
    B, C = map(int, input().split())
    print(total + (C - B) * num[B])
    total=total + (C - B) * num[B]
    num[C] += num[B]
    num[B] -= num[B]
    

### FIXED CODE ###

alpha=str(input())
check=alpha.isupper()

if check==True:
    print("A")
else:
    print("a")