peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
ans = 0
for i in range(n//7+1):
    if (n - i*7) % 4 == 0: ans += 1
print("Yes" if ans > 0 else "No")
# Judge status: Accepted
s = int(input())

a = [s]
m = 1
while s not in a[:-1]:
    if s % 2 == 0:
        s //= 2
    else:
        s = s * 3 + 1
    a.append(s)
    m += 1 
print(m)
# Judge status: Accepted
from itertools import combinations_with_replacement

def point(A):
    res = 0
    for i in range(Q):
        if x[i][1] > len(A):
            continue
        else:
            if A[x[i][1]-1] - A[x[i][0]-1] == x[i][2]:
                res += x[i][3]
    return res


N, M, Q = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(Q)]

ans = 0
for A in combinations_with_replacement(range(1, M+1), N):
    ans = max(ans, point(A))

print(ans)
# Judge status: Accepted
S,W=list(map(int,input().split()))

if S<=W: print("unsafe")
else: print("safe")
# Judge status: Wrong Answer
h=int(input())
w=int(input())
n=int(input())

if h>w:
  ct=n//h+1
else:
  ct=n//w+1
print(ct)
# Judge status: Wrong Answer
k, x=map(int, input().split())

if 500*k >= x:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
n, m = map(int, input().split())

l = list()
la = list()
ln = list()
for i in range(m):
    a, b = map(int, input().split())
    l.append([a, b])
    if 1 in [a, b]:
        la.append(a*b)
    if n in [a, b]:
        if a == n:
            ln.append(a)
        else:
            ln.append(b)

for i in ln:
    if i in la:
        print("POSSIBLE")
        exit()

print("IMPOSSIBLE")
# Judge status: Accepted
n=int(input())
s=list(input())
a=[chr(i) for i in range(65,65+26)]

for i in range(len(s)):
  for j in range(len(a)):
    if s[i]==a[j]:
      if j+n<26:
        s[i]=a[j+n]
      else:
        s[i]=a[j+n-26]
      break

print(''.join(s))
# Judge status: Accepted
import sys
sys.setrecursionlimit(100000000)
input = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
    N,M,K = map(int,input().split())
    for i in range(N + 1):
        for j in range(M + 1):
            if K == i*(M - j) + j*(N - i):
                print('Yes')
                return
    print('No')
if __name__ == '__main__':
    main()
# Judge status: Accepted
s=input()
sum=0
for i in range(3):
  if s[i] == '1':
    sum +=1
print(sum)
# Judge status: Accepted
N,M,*A=map(int,open(0).read().split())
from heapq import*
A=list(map(lambda x:-x,A))
heapify(A)
for _ in range(M):heappush(A,-(-heappop(A)//2))
print(-sum(A))
# Judge status: Accepted
n,m=map(int,input().split())
print(abs(n-2)*abs(m-2))
# Judge status: Accepted
S = input()
exp = len(S)-1

res = 0
for i in range(2**exp):
    eS = list("+".join(S))
    for j in range(exp):
        if (i >> j) & 1:
            eS[2*j+1] = "-"
    ans = "".join(eS)
    if eval(ans) == 7:
        res = ans + "=7"
        break

print(res)
# Judge status: Accepted
x = int(input())
if x==1:
    print(1)
else:
    tmp1 = (x-1)%11
    tmp2 = (x-1)//11
    if tmp1 > 5:
        print(2*tmp2 + 2)
    else:
        print(2*tmp2 + 1)
# Judge status: Accepted
numtcs = int(input())
judgement = []
for i in range(numtcs):
	judgement.append(input())

numac = judgement.count("AC")
print(f'AC x {numac}')
numwa = judgement.count("WA")
print(f'WA x {numwa}')
numtle = judgement.count("TLE")
print(f'TLE x {numtle}')
numre = judgement.count("RE")
print(f'RE x {numre}')
# Judge status: Accepted
N = int(input())

def getDivisors(x):
    anss = set()
    for d in range(1, int(x**0.5)+1):
        if x%d == 0:
            anss.add(d)
            anss.add(x//d)
    return sorted(anss)

divs = getDivisors(N)

ans = N
for div in divs:
    k = N//div
    ans = min(ans, div+k-2)

print(ans)
# Judge status: Accepted
K = int(input())
S = input()
print(S if len(S) <= K else S[0:K:1] + '...')
# Judge status: Accepted
import math
s=int(input())
if s<=2:
  print(0)
else:
  ans=1
  for i in range(1,s//3):
    ans+=math.factorial(s-(i+1)*3+i)//(math.factorial(s-(i+1)*3)*math.factorial(i))
    ans%=(10**9+7)
  print(ans)
# Judge status: Accepted
X, Y, Z = map(int, input().split())

X -= Z
print(X//(Y+Z))
# Judge status: Accepted
n = int(input())
a = ([list(map(int, input().split())) for _ in range(n)])
a.insert(0,[0,0,0])

dp = [[0,0,0] for _ in range(n+1)]

for i, a in enumerate(a):
  dp_1 = dp[i-1]
  dp[i][0] = max(dp_1[1], dp_1[2]) + a[0]
  dp[i][1] = max(dp_1[0], dp_1[2]) + a[1]
  dp[i][2] = max(dp_1[0], dp_1[1]) + a[2]

print(max(dp[n]))
# Judge status: Accepted
from math import atan, pi
a, b, x = map(int, input().split())
if x >  a*a*b-x:
    x = a*a*b-x
    rad = atan(2*x/(a*a*a))
    print(rad/pi * 180)
else:
    rad = atan(a*b*b/(2*x))
    print(rad/pi * 180)
# Judge status: Wrong Answer
s = input()
print("A", end="")
print(s[0], end="")
print("C")
# Judge status: Wrong Answer
MAX = 200
def Excel(n): 
    string = ["\0"] * MAX
    i = 0
    while n > 0: 
        rem = n % 26
        if rem == 0: 
            string[i] = 'z'
            i += 1
            n = (n //26) - 1
        else: 
            string[i] = chr(int(rem - 1 + 97))
            i += 1
            n = n // 26
    string[i] = '\0'
    string = string[::-1] 
    return "".join(string) 
n=int(input())
print(Excel(n))
# Judge status: Accepted
s = int(input())
ans = []
i = 1
while s not in ans:
    ans.append(s)
    if s % 2 == 0:
        s //= 2
    else:
        s = 3*s + 1
    i += 1
    
print(i)
# Judge status: Accepted
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

o = input()
e = input()
n = len(o) + len(e)
for i in range(n):
  if i % 2 == 0:print(o[i//2],end = "")
  else:print(e[i//2],end = "")
print()
# Judge status: Wrong Answer
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    ans = 0
    tail = A[N]
    idx = N-1
    while B:
        brave = B.pop()
        if brave >= tail + A[idx]:
            ans += tail + A[idx]
            tail = 0
        else:
            ans += brave
            tail = tail+A[idx]-brave
        idx -= 1
    print(ans)



    
if '__main__' == __name__:
    resolve()
# Judge status: Accepted
s = input()

import collections
c = collections.Counter(s)
for i in c.values():
    if i%2!=0:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
import numpy as np
D,T,S=(int(x) for x in input().split())
if T<D/S:
  print("No")
else:
  print("Yes")
# Judge status: Accepted
N, A, B = map(int, input().split())

loop =N//(A+B)
amari =N%(A+B)

if amari > A:
    print(A*(loop+1))

else:
    print(A*loop+amari)
# Judge status: Accepted
import bisect,collections,copy,heapq,itertools,math,string
import sys
def li(): return map(int,sys.stdin.readline().rstrip().split())
def lf(): return map(float,sys.stdin.readline().rstrip().split())
def ls(): return sys.stdin.readline().rstrip().split()

n, x = li()
p = list(li())
gcd = abs(x-p[0])
for i in range(n):
    gcd = math.gcd(gcd, abs(x-p[i]))

print(gcd)
# Judge status: Accepted
import numpy as np
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**8)

N = int(input())
A_str = input()

A_lst = A_str.split(" ")
A_lst = [int(A_lst[i]) for i in range(N)]

dai_lst = []

tmp = A_lst[0]

for a in A_lst:
  if a<tmp:
    dai_lst.append(tmp-a)
  elif a>tmp:
    tmp = a

out = sum(dai_lst)
print(out)
# Judge status: Wrong Answer
n, m = map(int, input().split())
baglist = [0]*(m+1)
for i in range(n):
    weight, value = map(int, input().split())
    for j in range(m,-1,-1):
        if (baglist[j] or j == 0) and j+weight <= m:
            baglist[j+weight] = max([baglist[j+weight], baglist[j]+value])
    print(baglist)
print(max(baglist))
# Judge status: Accepted
N = int(input())
output = ((10 ** N) - 2 * (9 ** N) + (8 ** N) ) % 1000000007
print(output)
# Judge status: Accepted
a = [int(input()) for _ in range(5)]
if all(i % 10 == 0 for i in a):
    print(sum(a))
else:
    b = sum(i // 10 for i in a) * 10
    c = [i % 10 for i in a if i % 10 != 0]
    print(b + len(c) * 10 - (10 - min(c)))
# Judge status: Wrong Answer
a, b = map(int, input().split())
op = [a + b, a - b, a * b]
print(max(op))
# Judge status: Wrong Answer
n,m=map(int,input().split())
for i in range(m):
    print(i+1,n-i)
# Judge status: Wrong Answer
a = input()
b = input()
if a == b[--1]:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
import collections
N=int(input())
a=list(map(int,input().split()))
c=collections.Counter(a)
ans=0
for i,j in c.items():
  if i>j:
    ans+=j
  elif j>i:
    ans += j-i
print(ans)
# Judge status: Accepted
n, m, x = map(int, input().split())
book = [list(map(int, input().split())) for i in range(n)]

min_num = 10**18

for i in range(1<<n):
    cost = 0
    l = [0]*m
    for j in range(n):
        if (i>>j)&1:
            c, *a = book[j]
            cost += c
            for k ,ak in enumerate(a):
                l[k] += ak
    if all(lj >= x for lj in l):
        min_num = min(min_num,cost)

print(-1 if min_num == 10**18 else min_num)
# Judge status: Wrong Answer
a,b,c = map(int,input().split(" "))
n = 0
if a == b == c:
  print(-1)
  exit()
for i in range(10**9):
  aa = a//2
  bb = b//2
  cc = c//2
  a = bb + cc
  b = aa + cc
  c = aa + bb
  n += 1
  if a % 2 == 1:
    break
  if b % 2 == 1:
    break
  if c % 2 == 1:
    break
print(n)
# Judge status: Accepted
import math
x,y=map(int,input().split())
lst=[]
lst.append(x)
for i in range(2,100):
    z=0
    z=math.pow(2,i-1)*x
    if z>y:
        print(len(lst))
        break
    else:
        lst.append(z)
# print()
# Judge status: Wrong Answer
a = int(input())

print(a//2 + 1)
# Judge status: Wrong Answer
a, b, c = [ int(i) for i in input().split(" ")]
sum = a + b + c
print(sum)
if sum >= 22:
  print("bust")
else:
  print("win")
# Judge status: Wrong Answer
s=int(input())
if s<1000:
    print('ABC'+str(s))
else:
    print('ABD'+str(s-999))
# Judge status: Accepted
N=int(input())
if N%10 in [2,4,5,7,9]:
    print('hon')
elif N%10 in [0,1,6,8]:
    print('pon')
else:
    print('bon')
# Judge status: Accepted
a,b=input().split()
print(min(a*int(b),b*int(a)))
# Judge status: Wrong Answer
A, B = map(int, input().split())

if A % 3 == 0 or B % 3 == 0 or (A+B) & 3 == 0:
    print("Possible")
else:
    print("Impossible")
# Judge status: Accepted
n, k = map(int, input().split())
s = input()

l = []
t = []
st = s[0]
for c in s[1:]:
    if not st or st[-1] == c:
        st += c
    else:
        l.append(len(st))
        t.append(st)
        st = c
l.append(len(st))
t.append(st)

print(len(''.join(t[:k*2])) + sum(map(lambda x: x-1, l[k*2:] if l[k*2:] else [0])))
# Judge status: Wrong Answer
from sys import stdin
N = int(stdin.readline().rstrip())
for i in range(1,N+1):
    ans = 0
    for x in range(1,32):
        for y in range(1,32):
            for z in range(1,32):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
                    ans += 1
    print(ans)
# Judge status: Wrong Answer
a, b = map(float, input().split())
b = int(b*100)
a = int(a)

print(int((a*b)//100))
# Judge status: Wrong Answer
n = int(input())
N = list(str(n))
ans = str()
res = N[0]
mn = int(res)
bl = True
for x in N:
    mn = min(mn, int(x))
    if x != res:
        bl = False
if bl:
    print(n)
else:
    if mn == int(res):
        for i in range(len(N)):
            ans += str(int(res) + 1)
        print(ans)
    else:
        for i in range(len(N)):
            ans += str(res)
        print(ans)
# Judge status: Wrong Answer
N,K = map(int,input().split())
a = list(map(int,input().split()))
for i in range(max(K,50)):
  if a == [N]*N:
    break
  temp = [0]*N
  for j in range(N):
    m = max(0,j-a[j])
    M = min(N-1,j+a[j])
    #print(j,m,M)
    for k in range(m,M+1):
      temp[k] += 1
  a = temp
b=[str(i) for i in a]
b=" ".join(b)
print(b)
# Judge status: Accepted
n = int(input())
moji = input()
res = 'Yes'
if n % 2 == 1:
    res = 'No'
else:
    for i in range(int(n/2)):
        if moji[i] != moji[int(n/2)+i]:
            res = 'No'
            break
      
print(res)
# Judge status: Accepted
a = [1, 3, 5, 7, 8, 10, 12]
b = [4, 6, 9, 11]
c = [2]
x, y = map(int, input().split())
if x in a and y in a:
    print('Yes')
elif x in b and y in b:
    print('Yes')
elif x in c and y in c:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import itertools

n,m,q=map(int, input().split())
a=[]
b=[]
c=[]
d=[]

for i in range(0,q):
    x,y,z,w=map(int, input().split())
    a.append(x)
    b.append(y)
    c.append(z)
    d.append(w)

res = 0
for A in itertools.combinations(range(1,m+1),n):
    tmp = 0
    for i in range(0,q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    print(A)
    print(tmp)
    if tmp > res:
        res = tmp
print(res)
# Judge status: Accepted
import sys
from fractions import gcd as gcd_base
from functools import reduce

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    _ = INT()
    A = LIST()

    gcd = lambda *numbers: reduce(gcd_base, numbers)
    print(gcd(*A))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
sx, sy, tx, ty = map(int, input().split())

u = 'U'
d = 'D'
r = 'R'
l = 'L'
x = tx - sx
y = ty - sy
result = []
# 1回目の行き
result += [u]*x
result += [r]*y
# 1回目の帰り
result += [d]*y
result += [l]*x

# 2回目の行き
result += [d]
result += [r]*(y+1)
result += [u]*(x+1)
result += [l]
# 2回目の帰り
result += [u]
result += [l]*(x+1)
result += [d]*(y+1)
result += [r]

print(''.join(result))
# Judge status: Wrong Answer
n, k = map(int, input().split())
rsp = list(map(int, input().split()))
t = input()
ans = 0
d = {'r': 2, 's':0, 'p': 1}
for c in t:
  ans += rsp[d[c]]
for i in range(k):
  prev = t[i]
  seq = 1
  for j in range(i+k, n, k):
    if t[j] == prev:
      seq += 1
    else:
      ans -= rsp[d[prev]] * (seq // 2)
      prev = t[j]
      seq = 1
    ans -= rsp[d[prev]] * (seq // 2)
print(ans)
# Judge status: Wrong Answer
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

A,B,C=nm()
K=int(input())

count=0
while(B<A):
    B*=2
    count+=1
while(C<B):
    C*=2
    count+=1

print('No' if K<count else 'Yes')
# Judge status: Accepted
n = int(input())
l = []
for i in range(1,n):
    l.append(sum([int(j) for j in list(str(n-i)+str(i))]))
print(min(l))
# Judge status: Accepted
N, K = map(int, input().split())
L = list(map(int, input().split()))

## Trivial = (N-1)//(K-1)

if (N-1) % (K-1) == 0:
  print( (N-1)//(K-1) )
else:
  print( (N-1)//(K-1) + 1)
# Judge status: Wrong Answer
#ABC118

n,m = list(map(int,input().split()))
food = [0] * m
for i in range(n):
    a = list(map(int,input().split()))
    for j in a[1:]:
        food[j-1] += 1
        
l = [food[i] for i in range(len(food)) if food[i] == n]
print(l,len(l))
# Judge status: Accepted
a,b,c=map(int,input().split())
if a%2==0 or b%2==0 or c%2==0:
    print(0)
    exit()
x=[a*b,b*c,c*a]
print(min(x))
# Judge status: Wrong Answer
a,b = map(int,input().split())

ans = a-1

for i in range(1,b-1):
  if a==i:
    ans = ans+1
    break

print(ans)
# Judge status: Wrong Answer
N = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(N):
    if i % 2 == 1 and a[i] % 2 ==1:
            cnt += 1
    else:
            cnt += 0
print(str(cnt))
# Judge status: Accepted
import re
def main():
    n = int(input())
    ans = []
    while n // 26 > 0:
        ans.append(chr(97 + (n-1)%26))
        n = (n - 1) // 26
    if n > 0:
        ans.append(chr(97 + (n-1)%26))

    ans.reverse()
    print("".join(ans))
    return 

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
a,b,c,d = input()

if a==b or a==c or a==d or b==c or b==d or c==d:
  print('Bad')
else:
  print('Good')
# Judge status: Wrong Answer
x,y = map(int, input().split())

mod = 10**9+7

def choose(n,r):
    p,q = 1,1
    for i in range(r):
        p = p*(n-i)%mod
        q = q*(i+1)%mod
    return p * pow(q,mod-2,mod) % mod # modの世界では逆元はpow(x,mod-2)をかけることと同じ

n = (2*x-y)/3
m = (y-n)/2

if int(n)*10 == n*10 and int(m)*10 == m*10:
    ans = choose(int(m+n), int(m))
else:
    ans = 0
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))


B = 0
C = 0
tmp = 0
for i in range(N):
    C += A[i]** 2
    B += A[i]

ans = (((B**2) - C) / 2) % (10 ** 9 + 7)
print(int(ans))
# Judge status: Accepted
N,T = map(int,input().split())
CT = [tuple(map(int,input().split())) for i in range(N)]
INF = float('inf')
ans = INF
for c,t in CT:
    if t <= T:
        ans = min(ans,c)
print('TLE' if ans==INF else ans)
# Judge status: Wrong Answer
N=int(input())
place=[]
score=[]
for i in range(N):
  p,s=input().split()
  place.append(p)
  score.append(s)
  score[i]=-int(score[i])
mylist=[]
for num in range(N):
  mylist.append([place[num],score[num],num])
from operator import itemgetter
mylist.sort(key=itemgetter(0,1))
for num in range(N):
  mylist[num].append(num+1)
mylist.sort(key=itemgetter(2))
for num in range(N):
  print(mylist[num][3])
# Judge status: Wrong Answer
n,w=map(int,raw_input().split())
a=[map(int,raw_input().split()) for _ in xrange(n)]
a.sort()
z=[[0]*(w+1)]
for i in xrange(n):
    z.append(z[-1][:])
    for j in xrange(w+1):
        if a[i][0]<=j:
            z[i+1][j]=max(z[i+1][j],z[i][j-a[i][0]]+a[i][1])
        else:
          break
print max(z[-1])
# Judge status: Accepted
n = int(input())

a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
sum = 0

for i in range(len(a)):
    sum += b[a[i] - 1]
    #print("i:{0} sum{1}".format(i, sum))#
    if(i != len(a) - 1 and a[i] + 1 == a[i + 1]):
        sum += c[a[i] - 1]
        #print("i:{0} sum{1}".format(i, sum))#

print(sum)
# Judge status: Accepted
from functools import reduce
mod = 10**9+7

def P(n, k):
  return reduce(lambda x, y:x*y%mod, range(n-k+1, n+1))

def factorial(n):
  return P(n, n)

def C(n, k):
  k = min(k, n-k)
  if k == 0:
    return 1
  else:
    return (P(n, k)*pow(factorial(k), mod-2, mod))%mod

X, Y = map(int, input().split())
if (X+Y)%3 == 0:
  n = Y-(X+Y)//3
  m = X-(X+Y)//3
  if n < 0 or m < 0:
    print(0)
  else:
    print(C(n+m, n))
else:
  print(0)
# Judge status: Accepted
import sys
n = int(input())

for i in range(1,10):
    if n <= 111*i:
        print(111*i)
        sys.exit()
# Judge status: Accepted
def solve():
    L,R,d = map(int,input().split())
    ans = 0
    for i in range(L,R+1):
        if i % d == 0:
            ans += 1
    
    print(ans)
if __name__ == '__main__':
    solve()
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split())) + [-1]
i = 0
count = 0
while i < n:
    if i+1 == p[i]:
        if i+2 == p[i+1]:
            i += 1

        count += 1
    i += 1

print(count)
# Judge status: Accepted
S = input()

print('Yes' if S[2] == S[3] and S[4] == S[5] else 'No')
# Judge status: Wrong Answer
N, K = map(int, input().rstrip().split())
Ps = [int(x) for x in input().rstrip().split()]

Ps_sum_list = []
Ps_sum = 0
for x in Ps:
    Ps_sum += x
    Ps_sum_list.append(Ps_sum)

max_val = 0
if N == K:
    max_val = Ps_sum_list[-1]
    print(max_val)
else:
    for i in range(N - K):
        val = Ps_sum_list[i + K] - Ps_sum_list[i]
        if val > max_val:
            max_val = val
    print((max_val + K) / 2)
# Judge status: Wrong Answer
N = int(input())
nums = list(map(int, input().split()))

d4 = 0
d2 = 0
d0 = 0
for n in nums:
    if n % 4 == 0:
        d4 += 1
    elif n % 2== 0:
        d2 += 1
    else:
        d0 += 1

if d2 > 0 and d0 <= d2:
    print('Yes')
elif d2 == 0 and d0 <= d4+1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n, m = [int(x) for x in input().split()]
ac = [0] * (n + 1)
wa = [0] * (n + 1)

for i in range(m):
    p, s = input().split()
    p = int(p)
    if s == "AC":
        ac[p] = 1
    if s == "WA" and ac[p] == 0:
        wa[p] += 1

print(sum(ac), sum([p for a, p  in zip(ac, wa) if a == 1]))
# Judge status: Accepted
n = str(input())
if n == 'a' or n == 'i' or n == 'u' or n == 'e' or n == 'o':
  print('vowel')
else:
  print('consonant')
# Judge status: Wrong Answer
N = int(input())
W = list(map(int, input().split()))

L = 0
for i in range(N):
    if L < sum(W) / 2:
        L += W[i]

R = sum(W) - L
print(abs(L-R))
# Judge status: Accepted
a,b = map(int,input().split())

if a >= 13:
  print(b)
elif 6 <= a <= 12:
  print(b // 2)
else:
  print(0)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
t,m=0,1000
for i in range(n-1):
    if a[i]<a[i+1]:
        b=m//a[i]
        t+=b
        m-=b*a[i]
    if a[i]>a[i+1]:
        m+=t*a[i]
        t=0
if t==0:
    print(m)
else:
    print(m+t*a[n-1])
# Judge status: Accepted
n, m = map(int, input().split())
roads = dict([(i,0) for i in range(n+1)])
#print(roads)
for i in range(m):
  a, b = map(int, input().split())
  roads[a] += 1
  roads[b] += 1
#print(roads)
for i in range(1, n+1):
  print(roads[i])
# Judge status: Wrong Answer
n, x, y = map(int, input().split())

LI = [0 for _ in range(n-1)]
for i in range(1,n):
	for j in range(i+1, n+1):
		dis = min((j-i), (abs(j-y)+abs(i-x)+1))
		print([i, j, dis])
		LI[dis-1] += 1

for i in range(n-1):
	print(LI[i])
# Judge status: Wrong Answer
a,b,c = input().split()
if a == b:
    if b == c:
        print('No')
    else:
        print('Yes')
elif b == c:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a, b = map(int, input().split())

if 9 < a or 9 < b:
  print(-1)
else:
  print(a * b)
# Judge status: Wrong Answer
A,B = map(int,input().split())
if A > B:
  print(A)
elif A < B:
  print(B)
# Judge status: Accepted
input_lines = input().split()
numbers = list(map(int,input().split()))
line = input()

if line == input_lines[0]:
    numbers[0] -= 1
else :
    numbers[1] -= 1

numbers = list(map(str,numbers))
print(numbers[0] + ' ' + numbers[1])
# Judge status: Accepted
n,m = [int(e) for e in input().split()]
a = [int(e) for e in input().split()]
for i in range(m):
    n -= a[i]
if n < 0:
    print(-1)
else:
    print(n)
# Judge status: Accepted
import sys
N = int(input())
if not ( 1 <= N <= 100 ):
    sys.exit()

for I in range(N // 4 + 1):
    for J in range(N // 7 + 1):
        if 4 * I + J * 7 == N:
            print('Yes')
            sys.exit()
print('No')
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if b-a==b-c:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))
m = sum(l)

for i in l:
    if i > m-i:
        print ("No")
        exit ()
else:
    print ("Yes")
# Judge status: Accepted
N = int(input())
divisors = [1 for _ in range(N+1)]
result = 0

for n in range(2, N+1):
  for m in range(n, N+1, n):
    divisors[m] += 1
for i, d in enumerate(divisors):
  result += i * d
print(result)
# Judge status: Accepted
N=int(input())
ans=100000000000
for a in range(1,N):
    b=N-a
    tempa=0
    tempb=0
    for i in range(len(str(a))):
        tempa+=a%10
        a=a//10
    for j in range(len(str(b))):
        tempb+=b%10
        b=b//10
    if tempa+tempb<ans:
        ans=tempa+tempb

print(ans)
# Judge status: Accepted
N = int(input())
i = 0
f = 0
while i <= N:
  if (N - i) % 7 == 0:
    print("Yes")
    f = 1
    break
  i += 4
if f == 0:
  print("No")
# Judge status: Accepted
n,k=map(int,input().split())
p=list(map(int,input().split()))
P=sorted(p)
ans=0
for i in range(k):
    ans+=P[i]
print(ans)
# Judge status: Wrong Answer
b = input().strip()
a = b.split()
a.pop(0)
print(len(set(a)))
# Judge status: Accepted
import re
s=input().replace("?",".")
t=input()
for i in range(len(s)-len(t),-1,-1):
    if re.match(s[i:i+len(t)],t):
        s=s.replace(".","a")
        print(s[:i]+t+s[i+len(t):])
        exit()
print("UNRESTORABLE")