peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
A = 0
for ai in a:
    A^=ai
ans = [A^ai for ai in a]
print(*ans)
# Judge status: Wrong Answer
H,N=map(int,input().split())
C=[0 for i in range(H+(10**4)+1)]
d=0
for i in [0]*N:
 A,B=map(int,input().split())
 for i in range(H+A+1):
  if A==i :
   C[i]=B
  elif A<i :
   if C[i]==0 and C[i-A]>0:
    C[i]=C[i-A]+B
   elif C[i-A]>0:
    C[i]=min(C[i],C[i-A]+B)
 d=max(d,A)
e=10**9
for i in range(H+1,H+d+1):
 if C[i]>0:
  e=min(C[i],e)
print(e)
# Judge status: Accepted
n,k,x,y = [int(input()) for i in range(4)]
print(min(k,n)*x+max(n-k,0)*y)
# Judge status: Wrong Answer
N = int(input())
X = list(map(int, input().split()))
M = sum(X)//N
ans = 0
for i in X:
    ans+=(i-M)**2
print(ans)
# Judge status: Wrong Answer
a = []
for i in range(3):
    a += map(int, input().split())

n = int(input())

for i in range(n):
    b = int(input())
    for j in range(9):
        if b == a[j]:
            a[j] = 'o'

isBingo = False
bingo = [[0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 4, 8], [2, 5, 7]]
for elem in bingo:
    if a[elem[0]] == 'o' and a[elem[1]] == 'o' and a[elem[2]] == 'o':
        isBingo = True
        break

print('Yes') if isBingo else print('No')
# Judge status: Accepted
import re  # 正規表現

s = input()

# re.sub(pattern, word, line) はlineのうち、patternに一致する部分をwordに変換します。
s = re.sub('eraser', '', s)
s = re.sub('erase', '', s)
s = re.sub('dreamer', '', s)
s = re.sub('dream', '', s)
print('YES' if len(s) == 0 else 'NO')
# Judge status: Wrong Answer
a, b, x = map(int, input().split(" "))

n = b//x+1
if a>1:
  m = a//x
elif a==1:
  m=1
elif a==0:
  m=0
ans = n-m

print("{}".format(ans))
# Judge status: Wrong Answer
s = input()
a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])

for i in [-1,1]:
    for j in [-1,1]:
        for k in [-1,1]:
            if a + i*b + j*c + k*d == 7:
                op1 = ['-','+'][i==1]
                op2 = ['-','+'][j==1]
                op3 = ['-','+'][k==1]
                print(f'{a}{op1}{b}{op2}{c}{op3}{d}=7')
                break
# Judge status: Accepted
n=int(input())
lst = list(map(int,input().split()))
gap=10000
for i in range(n):
  if abs(sum(lst[:i+1])-sum(lst[i+1:]))<gap:
    gap=abs(sum(lst[:i+1])-sum(lst[i+1:]))
print(gap)
# Judge status: Accepted
s = list(input())
k = int(input())
n = len(s)
for i in range(n):
    if s[i]=='a':continue
    d = ord('z')-ord(s[i])+1
    if d<=k:
        s[i] = 'a'
        k -= d

x = (ord(s[-1])-ord('a')+k)%26
s[-1] = chr(ord('a')+x)

print(''.join(s))
# Judge status: Accepted
# input
N = int(input())
X = list(map(int, input().split()))

# check
l, r = N // 2 - 1, N // 2
sort_x = sorted(X)
lx, rx = sort_x[l], sort_x[r]

if lx == rx:
    for i in range(N):
        print(lx)
else:
    for ind in range(N):
        target = X[ind]
        if target <= lx:
            print(rx)
        if target >= rx:
            print(lx)
# Judge status: Accepted
import sys
import math
import bisect

def main():
    a, b, c = map(int, input().split())
    ans = 0
    while ans < c and b >= a:
        b -= a
        ans += 1
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import fractions
# import math as fractions
mod = 10**9+7
n = int(input())
a = list(map(int, input().split()))

if n == 1:
    print(a[0])
    exit()

h = fractions.gcd(a[0], a[1])
g = h % mod
f = a[0]*a[1]//g
ans = a[0]//g+a[1]//g

for i in range(2, n):
    # print(ans, g, f)
    h = fractions.gcd(f, a[i])
    g = a[i] // h % mod
    f = f*a[i]// h
    ans *= g
    ans += f // a[i]
    ans %= mod
print(ans%mod)
# Judge status: Accepted
import numpy as np
N,M,X = map(int,input().split())
C = np.repeat(0, N)
A = np.repeat(0, N*M).reshape(N,M)
for i in range(N):
    x = list(map(int, input().split()))
    C[i] = x[0]
    A[i,:] = x[1:]

ans = np.inf

for _ in range(1<<N):
    # print(format(_, 'b').zfill(H+W))
    choices = [i for i,v in enumerate(format(_, 'b').zfill(N)) if v == '1']
    points = A[choices,:].sum(axis=0)
    if sum(points < X) == 0:
        ans = min(ans, sum(C[choices]))

ans = [ans, -1][np.isinf(ans)]
print(ans)
# Judge status: Wrong Answer
A,B,C=list(map(int,input().split()))
print(max(B//A,C))
# Judge status: Wrong Answer
n = int(input())
a_list = list(map(int, input().split()))
num = 1
for i in a_list:
  num *= i
print(num if num < 10**18 else "-1")
# Judge status: Accepted
a, b = map(int, input().split())
if a<=0 and 0<=b:
    print('Zero')
    exit()
elif a > 0:
    print('Positive')
    exit()
else:
    if ( b - a + 1 ) % 2 == 0:
        print('Positive')
        exit()
    else:
        print('Negative')
        exit()
# Judge status: Accepted
N = int(input())
ans = 100
i = 1
while i * 2 <= N:
  ans = min(ans, sum(map(int, list(str(i)))) + sum(map(int, list(str(N-i)))))
  i += 1
print(ans)
# Judge status: Accepted
from fractions import gcd
def lcm(p, q):
  return (p * q // int(gcd(p, q)))
N, M = map(int, input().split())
A = list(map(int,input().split()))
B = []
for i in range(N):
  b = 0
  while A[i] % 2 == 0:
    A[i] >>= 1
    b += 1
  B.append(b)
S = set(B)
if len(S) != 1:
  print(0)
else:
  P = 1
  for i in range(N):
    P = lcm(P, A[i])
  print((M // (2 ** (list(S)[0] - 1)) + P) // (2 * P))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
  A[i] -= i + 1
m = min(A)
for i in range(N):
  A[i] -= m
A.sort()
print(sum(abs(i - A[N//2]) for i in A))
# Judge status: Accepted
n = int(input())
l = [int(x) for x in input().split()]
l.append(100000) #100000はダミー
#print(n, l, len(l))
z = []
z.append(l[0]) # z[0]のみl[0]と決まる
for i in range(len(l)-1):
    #print(i)
    z.append(min(l[i],l[i+1]))

print(sum(z))
# Judge status: Accepted
import math
n, m = list(map(int, input().split()))
print(math.floor(n * (n - 1) / 2 + m * (m - 1) / 2))
# Judge status: Accepted
a,b=map(int,input().split())
if a==b:
   print(a*2)
else:
    print(max(a,b)*2-1)
# Judge status: Accepted
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n > k:
  print(k * x + (n - k) * y)
else:
  print(n * x)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
num = 0
for i in range(n):
    min_ab = min(a[i],b[i])
    num += min_ab
    a[i] -= min_ab
    b[i] -= min_ab
    if b[i] != 0:
        min_ab = min(a[i + 1],b[i])
        num += min_ab
        a[i + 1] -= min_ab
        b[i] -= min_ab
print(num)
# Judge status: Accepted
a, b, c = map(int, input().split())

max_candy = max(a, b, c)
else_candy = a + b + c - max_candy

if max_candy == else_candy:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import collections as col

def prime(n):
    ans = []
    num = n
    for i in range(2,int(n**0.5)+1):
        if i%2==0 and i!=2: continue
        while num%i == 0: num //= i ; ans.append(i)
    if num != 1: ans.append(num)
    return ans

def gcd(a,b): return gcd(b,a%b) if a%b else b

a,b = map(int,input().split())
primes = prime(gcd(a,b))
cnt = col.Counter(primes)
ans = len(cnt) + 1
print(ans)
# Judge status: Accepted
n, m = map(int,input().split())

print(n*(n-1)//2+m*(m-1)//2)
# Judge status: Accepted
n = int(input())
x = int(n**0.5)
while x*(x+1)//2 < n:
    x += 1
skip = x*(x+1)//2 - n
for i in range(1,x+1):
    if skip != i: print(i)
# Judge status: Wrong Answer
l, r, d = map(int, input().split())

ans = 0
for i in range(l, r+1):
    if i % d:
        ans += 1
print(ans)
# Judge status: Accepted
X = list(map(int,input().split()))
for i in [0,1]:
    if X.count(X[i]) == 2:
        print('Yes')
        exit()

print('No')
# Judge status: Accepted
x = int(input())
num = x//11
if x % 11 > 6:
  print(num * 2 + 2)
elif x % 11 > 0:
  print(num * 2 + 1)
else:
  print(num * 2)
# Judge status: Wrong Answer
N = int(input())

dic = {}
B = []

for i in range(N):
    a, b = map(int,input().split())
    B.append(b)
    if '{}'.format(b) in dic:
        dic['{}'.format(b)] += a
    else:
        dic['{}'.format(b)] = a

Bs = sorted(B)

time = 0

for i, num in enumerate(Bs):
    time += dic['{}'.format(num)]
    if num < time:
        print('NO')
        break

    if i == len(Bs)-1:
        print('Yes')
# Judge status: Accepted
a,b,x=map(int, input().split())

print("YES" if a<=x<=a+b else "NO")
# Judge status: Accepted
S = input()

v = 10**10
for i in range(len(S) - 2):
    s = int(S[i:i + 3])
    s = abs(753 - s)
    v = min(v, s)
print(v)
# Judge status: Wrong Answer
n,k=map(int,input().split())
p=list(map(int, input().split()))
for i in range(n):
	p[i]=(1+p[i])/2
cs=[]
sum=0
for i in range(n):
	sum+=p[i]
	cs.append(sum)
ans=0
for i in range(n-k+1):
	ans=max(ans,cs[i+k-1]-cs[i-1])
print('{:.8f}'.format(ans))
# Judge status: Accepted
a,b=map(int, input().split())
for i in range(b-a+1,b+a):
  print(i)
# Judge status: Wrong Answer
s = int(input())
a = [s]
while True:
  if s % 2 == 0:
    s = s // 2
  else:
    s = 3 * s + 1
  if s in a:
    print(s)
    break
  a.append(s)
# Judge status: Wrong Answer
day = input()

if day == "SUN":
  print(7)
elif day == "MUN":
  print(6)
elif day == "TUE":
  print(5)
elif day == "WED":
  print(4)
elif day == "THU":
  print(3)
elif day == "FRI":
  print(2)
elif day == "SAT":
  print(1)
# Judge status: Wrong Answer
S = input()
result = ["Yes" if (len(S) > 1) and (S[-2] == "h") and (S[-1] == "i") else "No"]
p = list(map(print, result))
# Judge status: Accepted
w, a, b = map(int, input().split())

if a < b:
    if b <= a + w:
        print(0)
    else:
        print(b - (a + w))
elif a > b:
    if a <= b + w:
        print(0)
    else:
        print(a - (b + w))
else:
    print(0)
# Judge status: Wrong Answer
a,b=map(int,input().split())
print((a+b)/2)
# Judge status: Accepted
N,L=map(int,input().split())
RES = 0
res = 100
mid = 0
List = []
for i in range(N):
  mid = L+i
  List.append(mid)
  if abs(mid)<abs(res):
    res = mid
for i in range(N):
  if res == List[i]:
    pass
  else:
    RES += List[i]
print(RES)
# Judge status: Accepted
def main():
    K = [int(input()) for _ in range(5)]
    ans = []
    A = [0]
    for k in K:
        a = k % 10
        if a == 0:
            ans.append(k)
        else:
            ans.append(k + (10 - a))
            A.append(10 - a)
    print(sum(ans) - max(A))


if __name__ == "__main__":
    main()
# Judge status: Accepted
n, x = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for i in range(1, n):
    s = a[i] + a[i-1]
    if s > x:
        ans += s - x
        if a[i] >= s - x:
            a[i] -= s - x
        else:
            a[i] = 0     
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))

ans=sum(b)

for i in range(n-1):
  k=a[i]
  if a[i+1]==k+1:
    ans+=c[i]
  else:
    ans+=0
print(ans)
# Judge status: Accepted
from collections import Counter

n, k = map(int, input().split())
L = list(map(int, input().split()))
cnt = Counter(L)
if len(cnt.keys()) <= k:
  print(0)
else:
  rewrite_groups = len(cnt.keys()) - k
  print(sum(sorted(cnt.values())[:rewrite_groups]))
# Judge status: Accepted
a, b = map(int, input().split())
if a < 10 and b < 10:
  print(a * b)
else:
  print('-1')
# Judge status: Wrong Answer
A,B,K = map(int, input().split())
for i in range(A,A+K):
    print(i)
for i in range(B-K+1,B+1):
    print(i)
# Judge status: Accepted
import sys
a=list(map(int,input().split()))
a.sort()
l0=a[0]-a[2]
l1=a[1]-a[2]
l2=0
c=0
while(c<1000):
    if l2==l1 and l2==l0:
        print(c)
        break
    elif l1==l0:
        l1+=1
        l0+=1
    elif (l1-l0)%2==0:
        l0+=2
    else:
        l0+=1
        l2+=1
    c+=1
# Judge status: Wrong Answer
n= int(input())

print(n*800-n%15*200)
# Judge status: Accepted
n = input()
m = 0

for i in range(int(n)):
    m+=i+1
    
print(int(m))
# Judge status: Accepted
s=input()
for i in range(2,len(s)+1,2):
  if s[:(len(s)-i)//2]==s[(len(s)-i)//2:len(s)-i]:
    print(len(s)-i)
    exit()
if s[0]==s[1]:
  print(2)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    S, W = map(int, input().split())
    answer = ""
    if S <= W:
        answer = "unsafe"
    else:
        answer = "safe"
    print(answer)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n,k = map(int,input().split())
r,s,p = map(int,input().split())
st = input()
for i in range(len(st)-k):
    if st[i] == st[i + k]:
        st = st[:i + k]+ 'no' + st[i + k + 1:]
win = r*st.count('s') + s*st.count('p') + p*st.count('r')
print(win)
# Judge status: Accepted
import sys

rr = lambda: sys.stdin.readline().rstrip()

s = list(rr())
cnt = 0
for i in range(len(s)-1):
  si = s[i]
  si1 = s[i+1]
  if si == si1:
    if si == '0':
      s[i+1] = '1'
    else:
      s[i+1] = '0'
    cnt += 1
print(cnt)
# Judge status: Accepted
a, b = map(int,input().split())
 
if a > 12:
  print(b)
elif a > 5:
  print(int(b/2))
else:
  print(0)
# Judge status: Accepted
print "Yes" if len(set(raw_input().split()))==2 else "No"
# Judge status: Accepted
K,X=map(int,input().split())
if 500*K >= X:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
c = [0]*3
for i in range(3):
	c[i] = list(map(int,input().split()))
a = [0]*3
b = [0]*3
a[0] = 0
for j in range(3):
	b[j] = c[0][j] - a[0]
a[1] = c[1][0] - b[0]
a[2] = c[2][0] - b[0]
count = 0
for i in range(3):
	for j in range(3):
		if c[i][j] == a[i] + b[j]:
			count += 1
if count == 9:
	print('Yes')
else:
	print('No')
# Judge status: Wrong Answer
N, A, B = map(int,input().split())

ans = 0
for n in range(N):
  sums = sum(list(map(int,list(str(n)))))
  if A <= sums and sums <= B:
    ans += sums
print(ans)
# Judge status: Accepted
s = input()
n = len(s)
first, last = 0,0

for i in range(n):
  b,f = i+1, n-i
  if s[-1-i] == 'A':
    first = f
  if s[i] == 'Z':
    last = b

# print(first, last)
print(last - first+1)
# Judge status: Wrong Answer
import math

N,K = map(int,input().split())
A = list(map(int,input().split()))
light = A.copy()

def shine(n,j):
  inf = math.ceil(max(j - n - 0.5,1)) - 1
  sup = math.floor(min(j + n + 0.5,N))
  for k in range(inf,sup):
    tmp[k] += 1

lim = min(50,K)

while lim > 0:
  tmp = [0] * N
  for i in range(0,N):
    shine(light[i],i + 1)
  light = tmp
  lim -= 1
    
print(light)
# Judge status: Wrong Answer
a = int(input())
print(a*(a**2)*(a**3))
# Judge status: Accepted
a, b, c = map(int, input().split())
if c >= a and c <= b:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
import sys
n = int(input())

for i in range(1,10):
  mod,ret = divmod(n,i)
  if ret == 0 and  mod <= 9:
    print('Yes')
    sys.exit()
print('No')
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
c = list(range(1,n+1))
print('NO' if sum([i!=j for i,j in zip(p,c)]) > 2 else 'YES')
# Judge status: Accepted
n=int(input())
p=[]*n
p=list(map(int,input().split()))
cnt=0
com=p[0]
for i in range(n):
    if com>=p[i]:
        cnt+=1
    com=min(com,p[i])
print(cnt)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
l = {}
r = {}
for i in range(n):
    p = i+a[i]
    q = i-a[i]
    if p < n:
        if p in l:
            l[p] = l[p]+1
        else:
            l[p] = 1
    if q > 0:
        if q in r:
            r[q] = r[q]+1
        else:
            r[q] = 1
ans = 0
for i in l:
    if i in r:
        ans+= l[i]*r[i]
print(ans)
# Judge status: Wrong Answer
import math
X =int(input())

deposit = 100
year = 0
while deposit<X:
  deposit = math.floor(deposit +deposit*0.01)
  #print(deposit)
  year+=1
  
print (year)
# Judge status: Wrong Answer
N, D = map(int, input().split())
zahyo = [0]*N
for i in range(N):
  zahyo[i] = list(map(int, input().split()))
count = 0
for i in range(N):
  for j in range(i+1, N):
    V = 0
    for k in range(D):
      V += (zahyo[i][k]-zahyo[j][k])**2
    if isinstance(V, int):
      count += 1
print(count)
# Judge status: Accepted
#02:04
n = int(input())
a = list(map(int,input().split()))
b = max(a)
c = []
h = b/2
for i in range(n):
  c.append([abs(a[i]-h),a[i]])
d = min(c)[1]
print(b,d)
# Judge status: Accepted
n = int(input())
data = [list(map(int, input().strip().split())) for _ in range(n)]

data = sorted(data, key=lambda d: d[1])

work_time = 0
impossible = False
for a, b in data:
    deadline = b
    work_time += a
    if work_time > b:
        impossible = True
        break

if impossible:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
n,m = map(int,input().split())
ans = 0
if(n >= 2):
    ans += n*(n-1)//2
    
if(m >= 2):
    ans += m*(m-1)//2
print(ans)
# Judge status: Wrong Answer
ab , bc , ca = map(int , input(). split())
print(min(ab , ca) + bc)
# Judge status: Accepted
N,A,B=map(int,input().split())
if (A-B)%2==0:
  ans=int((B-A)//2)
else:
  ans=int(min(A-1,N-B)+1+(B-A-1)//2)
print(ans)
# Judge status: Wrong Answer
import numpy as np
import collections

n = int(input())
aa = np.array(list(map(int,input().split())))
c = collections.Counter(aa)
a=np.unique(aa)
amax=max(a)+1
ah=[0]*amax

for i in a:
    if c[i]>=2 and ah[i]==0:
        ah[i]=2
        continue
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)
# Judge status: Accepted
from collections import deque
N,M,*AB=map(int,open(0).read().split())
to=[[] for _ in range(N)]
for a,b in zip(*[iter(AB)]*2):
  to[a-1].append(b-1)
  to[b-1].append(a-1)
q=deque([0])
r=[None]*N
while q:
  x=q.popleft()
  for i in to[x]:
    if r[i] is None:
      q.append(i)
      r[i]=x+1
print("Yes",*r[1:],sep="\n")
# Judge status: Accepted
# -*- coding: utf-8 -*-

N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)

Alice = 0
Bob = 0

for x in range(0, len(a), 2):
    Alice += a[x]

for x in range(1, len(a), 2):
    Bob += a[x]

print(Alice - Bob)
# Judge status: Wrong Answer
w = "SUN,MON,TUE,WED,THU,FRI,SAT".split(",")

S = input().strip()

for i, d in enumerate(w):
    if d == S:
        print(-i % 7)
# Judge status: Accepted
import sys

H, N = map(int, input().split())
AB = [list(map(int, sys.stdin.readline().split())) for _ in range(N)]

dp = [float('inf') for _ in range(H + max(AB)[0] + 1)]
dp[0] = 0
for h in range(H + max(AB)[0] + 1):
    for n in range(N):
        if h - AB[n][0] >= 0:
            dp[h] = min(dp[h - AB[n][0]] + AB[n][1], dp[h])

print(min(dp[H:]))
# Judge status: Accepted
N = int(input(' '))
A = input().split(' ')
A = [int(A[i]) for i in range(3*N)]
A = sorted(A, reverse=True)
STG = 0
for i in range(2*N):
  if not i%2==0:
    STG += A[i]
print(STG)
# Judge status: Accepted
a,b=map(int,input().split())
c = a*str(b)
d = b*str(a)
if c < d :
    print(str(c))
else :
    print(str(d))
# Judge status: Accepted
from collections import deque

n, k = map(int, input().split())
a = list(map(int, input().split()))
queue = deque()
for i in range(n):
    if i <= k - 1:
        queue.append(a[i])
    elif i >= k:
        x = queue.popleft()
        if x < a[i]:
            print("Yes")
        else:
            print("No")
        queue.append(a[i])
# Judge status: Accepted
def main():
    N,K = map(int, input().split())
    p = list(map(int, input().split()))

    temp = 0
    for k in range(K):
        temp += calc_e(p[k])
    res = temp
    for n in range(N-K):
        temp -= calc_e(p[n])
        temp += calc_e(p[n+K])
        if(temp > res): res = temp
    print(res)


def calc_e(pi):
    return(sum(range(1,pi+1))/pi)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
N = int(input())
W=[]
ss=True
for i in range (N):
  W.append(input())



for t in range (N-1):
    if W[t-1][-1]==W[t][0]:
      ss=True
    else:
      ss=False 
     
      

if len(W)!=len(set(W)):   
  ss=False
     
if ss==False:
  print("No")
else:
  print("Yes")
# Judge status: Accepted
import collections
s = input()
t = input()
s_cnt = collections.Counter(s)
t_cnt = collections.Counter(t)
a = s_cnt.most_common()
b = t_cnt.most_common()
ans = True
for i in range(len(a)):
    if a[i][1] != b[i][1]:
        ans = False
        break

print('Yes' if ans else 'No')
# Judge status: Accepted
x, y = map(int, input().split())
if x % y == 0:
    print(-1)
else:
    cnt = 1
    while True:
        if (x * cnt) % y != 0:
            print(x * cnt)
            exit()
        cnt += 1
# Judge status: Accepted
A, B, C=map(int,input().split())
K=int(input())
ab=int(A/B)
if ab==0:
  x=0
else:
  x=int(len(bin(ab))-2)
B1=B*(2**x)
bc=int(B1/C)
if bc==0:
  y=0
else:
  y=int(len(bin(bc))-2)
if x+y<=K:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
x = int(input())

q, r = divmod(x, 11)
if r == 0:
    print(q*2)
elif r <= 6:
    print(q*2 + 1)
else:
    print(q*2 + 2)
# Judge status: Wrong Answer
import sys
a1=sys.stdin.readline()
a2=list(a1)
b=[x for x in a2]
b.sort()
if len(a2)==4 and b[0]==b[1] and b[2]==b[3] and b[1]!=b[2]:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

A = [a,b,c,d,e]
wa = 0

for i in range(4):
    if A[-1-i]-A[-2-i]>k:
        wa += 1
        
print(":("*(wa>=0) or "Yay!")
# Judge status: Accepted
a, b = map(int, input().split())

count = 0

for i in range(a, b + 1):
    x = str(i)
    y = x[::-1]
    if x == y:
        count += 1

print(count)
# Judge status: Accepted
a,b = map(int,input().split())
if a <= 5:
    print(0)
elif 6 <= a <= 12:
    print(int(b/2))
else:
    print(b)
# Judge status: Accepted
#

import sys
from copy import deepcopy
input=sys.stdin.readline

def main():
    a,b=map(int,input().split())
    if a*b<=0:
        print("Zero")
    elif a>0:
        print("Positive")
    else:
        pm=(b-a+1)
        if pm%2==0:
            print("Positive")
        else:
            print("Negative")
    
if __name__=="__main__":
    main()
# Judge status: Accepted
S = input()

ans = 0
cnt = 0
for i in S:
    if i in ("A","C","G","T"):
        cnt += 1
    else:
        ans = max(ans,cnt)
        cnt = 0
ans = max(ans,cnt)
        
print(ans)
# Judge status: Wrong Answer
N = int(input())
ans = [0] * 10000

for x in range(1, 1000):
    for y in range(1, 1000):
        for z in range(1, 1000):

            f = x**2 + y**2 + z**2 + x*y + y*z + z*x

            if f < 10000:
                ans[f-1] = ans[f-1] + 1 

            if f > N:
                break
            
for i in range(N):
    print(ans[i])
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

d = [0]*n
for i in a:
    d[i-1] += 1

s = 0
for i in range(n):
    s += int(d[i]*(d[i]-1)/2)

for i in range(n):
    print(s-(d[a[i]-1]-1))
# Judge status: Wrong Answer
print(round(sum(list(map(int,input().split())))/2))
# Judge status: Accepted
n = int(input())
a = int(input())

while 500 <= n:
  n = n- 500
if n <= a:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import numpy as np
n = int(input())
s = np.sqrt(n)
for i in range(int(s)):
    if n % (int(s)-i) == 0:
        print(int(s)-i-1 + n//(int(s)-i)-1)
        break
# Judge status: Accepted
N=int(input())
S=input()
SS=S.replace("I","1,").replace("D","-1,").split(",")
cnt=0
ans=0
for i in range(N):
    cnt+=int(SS[i])
    ans=max(ans,cnt)
print(ans)
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
ans = 1
mn = p[0]
for i in range(1, n):
    if p[i] <= mn:
        ans += 1
    mn = min(mn, p[i])

print(ans)
# Judge status: Accepted
N,M=map(int,input().split())
A=[input() for _ in range(N)]
B=[input() for _ in range(M)]
for i in range(N-M+1):
  for j in range(len(A[i])-len(B[0])+1):
    if B[0][0]==A[i][j]:
      flag=True
      p=i
      for k in range(M):
        if not B[k]==A[p][j:j+len(B[k])]:
          flag=False
          break
        p+=1
      if flag:
        print('Yes')
        exit()
print('No')
# Judge status: Accepted
n, k = map(int, input().split())
if n<6:
	print("0")
elif n < 13:
	print(k//2)
else:
	print(k)
# Judge status: Accepted
N = int(input())
A = int(input())

N2= N  %  500;

if N2 <= A:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N, M = map(int, input().split())
if N < 3 or M < 3:
    print(0)
else:
    print((M-2) * (N-2))
# Judge status: Accepted
nums = list(map(int, input().split()))

nums.sort()
print(nums[2] * 10 + nums[1] + nums[0])
# Judge status: Accepted
k,x = map(int, input().split())
L = []
for i in range(x-(k-1),x+k):
  L.append(i)
  
print(*L)