peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
M=0
ans = 1
for i in range(1,N+1):
    num = i
    tmp = 0
    while(num % 2 == 0):
        tmp += 1
        num /= 2
    if M < tmp:
        M = tmp
        ans = i
print(ans)
# Judge status: Accepted
a,b,k = map(int,input().split(" "))
if a + b <= k:
    print("0 0")
elif a <= k:
    print("0 " + str(b+a-k))
else:
    print(str(a-k) + " " + str(b))
# Judge status: Accepted
import numpy as np
import math

a,b,c,d=(float(x) for x in input().split());

takalife = math.ceil(a/d);
aolife = math.ceil(c/b);

if takalife==aolife or takalife>aolife:
  print("Yes");
else:
  print("No")
# Judge status: Wrong Answer
k=int(input())
if k % 2 == 0:
  kazu = k/2
  print(kazu**2)
  
else:
  kazu = k //2
  print( kazu * (kazu+1))
# Judge status: Wrong Answer
import itertools as iters

N = int(input())
alpha = "abcdefghijk"
for s in iters.product(range(1,N+1),repeat=N-1):
    #print(s)
    r = [alpha[ss-1] for ss in s]
    print("a"+"".join(r))
# Judge status: Accepted
n=int(input())
h=list(map(int,input().split()))

for i in range(n-1):
  if h[i+1]>=h[i]+1:
    h[i+1]-=1
  elif h[i+1]<h[i]:
    print('No')
    exit()
print('Yes')
# Judge status: Accepted
N,X,T = map(int,input().split())
count = 1
while N > X:
  N = N - X
  count += 1
print(T*count)
# Judge status: Accepted
import sys
N = int(sys.stdin.readline().rstrip())
s = []
if N == 0:
    print(0)
    exit()
base = 1
cur = 2
while N != 0:
    r = N % cur
    r = r + cur if r < 0 else r
    if r > 0:
        s.append("1")
        N -= base
    else:
        s.append("0")
    cur *= 2
    base *= -2
print("".join(s[::-1]))
# Judge status: Accepted
from fractions import gcd
N = int(input())
A = list(map(int, input().split()))
ans = A[0]
for a in A:
  ans = gcd(ans, a)
print(ans)
# Judge status: Accepted
x, y = list(map(int, input().split()))

c = list(map(int, input().split()))

l = set()

for _ in range(y):
    a, b = list(map(int, input().split()))
    if c[a-1] > c[b-1]:
        l.add(b-1)
    elif c[a-1] < c[b-1]:
        l.add(a-1)
    else:
        l.add(a-1)
        l.add(b-1)
l = list(l)
print(len(c) - len(l))
# Judge status: Wrong Answer
k,x=map(int,input().split())

ans=''
for i in range(-k+1,k):
  if abs(i)<=2000000:
    ans+=str(i)+' '
print(ans)
# Judge status: Wrong Answer
from collections import deque


d = deque()
S = input()
d.append(S)
q = int(input())

for i in range(q):
    query = input()
    if query == '1':
        if len(d) > 1:
            d.reverse()
    else:
        s_lis = query.split()
        n = int(s_lis[0])
        f = int(s_lis[1])
        c = s_lis[2]
        if f == 1:
            d.appendleft(c)
        else:
            d.append(c)

d_lis = list(d)

print("".join(d_lis))
# Judge status: Wrong Answer
S = sorted(input())
if S == "abc":  print("Yes")
else:  print("No")
# Judge status: Accepted
n = int(input())
aas = list(map(int, input().split()))
res = 0
for i in range(n):
    if (i+1)%2!=0 and aas[i]%2!=0:
        res += 1
print(res)
# Judge status: Wrong Answer
x,y,a,b,c = map(int,input().split())
n = a+b+c
ar = list(map(int,input().split()))
br = list(map(int,input().split()))
cr = list(map(int,input().split()))
ls = []
for i in ar:
  ls.append([i,1])
for i in br:
  ls.append([i,2])
for i in cr:
  ls.append([i,3])
ls.sort(reverse = True)
nx = 0
ny = 0
cnt = 0
res = 0
for item in ls:
  if item[1]==x:
    if nx==x: continue
    nx+=1
  if item[1]==y:
    if ny==y: continue
    ny+=1
  res+=item[0]
  cnt+=1
  if cnt==x+y:
    break
print(res)
# Judge status: Wrong Answer
A,B,C = input().split()
A = int(A)
B = int(B)
C = int(C)
if A == B :
    print('Yes')
elif B == C :
    print('Yes')
elif C == A :
    print('Yes')
else :
    print('No')
# Judge status: Accepted
h1, m1, h2, m2, k = map(int, input().split())

t = 60 * h2 + m2 - (60 * h1 + m1) - k

print(t)
# Judge status: Accepted
N=int(input())

if N % 1000 == 0:
    print(0)
else:
    print(1000 - N%1000)
# Judge status: Accepted
S = input()
ans=0
for i in range(int(len(S)/2)):
  if S[i]!=S[len(S)-1-i]:
    ans+=1
print(ans)
# Judge status: Wrong Answer
N,K = map(int,input().split())
s = [input() for i in range(K*2)]
l = []
c = 0
k = 0
m = 0
# スペース区切りの整数の入力
num = []
for i in range(K*2):
  if i%2==1:
    for m in range(int(s[i-1])):
      num.append(s[i].split()[m])
for j in (1,N):
  k=num.count(str(j))
  if k == 0:
    c = c+1
print(c)
# Judge status: Accepted

def main():
    X = int(input())
    ans = 0
    x = 360
    while x != 0:
        x = x - X
        ans += 1
        if (x < 0):
            x += 360
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
d = int(input())
print("Christmas", end = " ")
if d == 24: print("Eve")
elif d == 23: print("Eve Eve")
else: print("Eve Eve Eve")
# Judge status: Accepted

n = int(input())
if n % 2 == 1:
	print(0)
	exit()
 
# 5の倍数で割り切れる回数
result = 0
i = 1
while True:
	result += n // ((5 ** i) * 2)
	i += 1
	if n < ((5 ** i) * 2): break
 
# 結果出力
print(result)
# Judge status: Accepted
n, total = [int(i) for i in input().split()]

for a in range(n+1):
  for b in range(n+1-a):
    c = n-a-b
    if c >= 0:
      if 10000*a + 5000*b + 1000*c == total:
        print('{} {} {}'.format(a, b, c))
        exit()
print('-1 -1 -1')
# Judge status: Accepted
X,Y = map(int, input().split())
print(X + int(Y/2))
# Judge status: Accepted
a,b,c=map(int,input().split("/"))
if 5<=b:print("TBD")
else:print("Heisei")
# Judge status: Accepted
n, k = map(int, input().split())

ha = [0] * n
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))

    for j in range(d):
        buf = a[j]-1
        ha[buf] += 1

ans = 0
for i in range(n):
    if ha[i] == 0:
        ans += 1

print(ans)
# Judge status: Wrong Answer
N = int(input())
A = input().split()
A = [int(i) for i in A]
t = 0
for i in range(N-1):
  if A[i] % 2 == 0:
    if A[i]%3 !=0 and A[i]%5 != 0:
      t += 1
if t == 0:
  print("APPROVED")
else:
  print("DENIED")
# Judge status: Accepted
n,k,s=map(int,input().split())
A=[s]*k
if s==10**9:
    for i in range(n-k):
        A.append(1)
else:
    for i in range(n-k):
        A.append(s+1)
print(*A)
# Judge status: Wrong Answer
def lis(arr):
    n = len(arr)
    # dp
    lis = [1] * n
    for i in range(1, n):
        for j in range(i):
            if arr[i] > arr[j] and lis[i] < lis[j] + 1:
                lis[i] = lis[j] + 1
    
    maximum = 0
    for i in range(n):
        maximum = max(maximum, lis[i])
    
    return maximum

n=int(input())
a=[int(input())*(-1) for i in range(n)]

print(lis(a))
# Judge status: Accepted
S = list(input())

if S[0] == 'A' and S[2:-1].count('C') == 1:
    S.pop(S[2:-1].index('C')+2)
    S.pop(0)
    if ''.join(S) == ''.join(S).lower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')
# Judge status: Wrong Answer
K = int(input())
A, B = map(int, input().split())

if A % K == 0:
  print('OK')
elif B % K == 0:
  print('OK')
elif A <= K and K <= B:
  print('OK')
elif K * ((A % K) + 1) <= B:
  print('OK')
else:
  print('No')
# Judge status: Accepted
N = int(input())
if 1 <= N <= 9:
    ans = N
elif 10 <= N <= 99:
    ans = 9
elif 100 <= N <= 999:
    ans = 9 + N - 99
elif 1000 <= N <= 9999:
    ans = 9 + 900
elif 10000 <= N <= 99999:
    ans = 9 + 900 + N - 9999
elif N == 100000:
    ans = 9 + 900 + 90000
print(ans)
# Judge status: Wrong Answer
from math import ceil
from math import log
n,k=map(int,input().split())
print(ceil(log(n)/log(k)))
# Judge status: Wrong Answer
import math
import numpy as np
A,B = list(map(int,input().split()))
if A == 1:
  print(B)
  exit()
if B == 1:
  print(A)
  exit()
C = A*B
D = []
for i in range(1,int(math.sqrt(C))):
  if A % i == 0 and B % i == 0:
    A = A // i
    B = B // i
    D.append(i)
    C = A*B
p = np.prod(D)
if p != 0:
  C = C*p
print(C)
# Judge status: Wrong Answer
N = int(input())
D = list(map(int, input().split()))
MOD = 998244353
cnt = [0] * (10 ** 5 + 1)
for d in D:
    cnt[d] += 1
ans = cnt[0]
for i in range(1, 10 ** 5 + 1):
    now = cnt[i - 1] ** cnt[i]
    now %= MOD
    ans *= now
    ans %= MOD
print(ans)
# Judge status: Wrong Answer
s = list(input())

if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
# Judge status: Accepted
D = int(input())
if D == 25:
  print("Christmas")
elif D == 24:
  print("Christmas Eve")
elif D == 23:
  print("Christmas Eve Eve")
else:
  print("Christmas Eve Eve Eve")
# Judge status: Accepted
a,b = map(int,input().split())
if a < 0 and b > 0:
    print("Zero")
elif a == 0 or b == 0:
    print("Zero")
elif a > 0:
    print("Positive")
else:
    n_c = b-a+1
    if n_c % 2 == 0:
        print("Positive")
    else:
        print("Negative")
# Judge status: Accepted
def solve():

    N = input()

    if '7' in N:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    solve()
# Judge status: Wrong Answer
#!/usr/bin python3
# -*- coding: utf-8 -*-

from collections import Counter

def main():
    N = int(input())
    S = list(input())
    S = Counter(S)
    ret = 1
    for i,c in S.items():
        ret *= (c+1)
    print(ret-1)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())
rate = [0] * 9
for v in map(int, input().split()):
    if v // 400 < 8:
        rate[v // 400] = 1
    else:
        rate[8] += 1

ans = sum(rate[:8])
if rate[8] == 0:
    print('{} {}'.format(ans, ans))
else:
    print('{} {}'.format(ans, min(8, ans + rate[8])))
# Judge status: Accepted
n = list(input())

if n[0] == n[1]:
  print("Bad")
  exit()
elif n[1] == n[2]:
  print("Bad")
  exit()
elif n[2] == n[3]:
  print("Bad")
  exit()
print('Good')
# Judge status: Accepted
x = int(input())
if x == 0:
    print('1')
else:
    print('0')
# Judge status: Wrong Answer
n=int(input())
if n%2!=0:
  print(0)
  exit(0)
n//=10

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

n=Base_10_to_n(n,5)
n=reversed(list(n))
tmp=1
ans=0
for i in n:
  ans+=int(i)*tmp
  tmp=tmp*5+1
print(ans)
# Judge status: Wrong Answer
s = sorted(input(), reverse = True)
t = sorted(input(), reverse = True)
larger = len(s) if len(s) > len(t) else len(t)
try:
    for i in range(larger):
        if s[i] > t[i]:
            print('No')
            break
    else:
        print('Yes')
except:
    if len(s) < len(t):
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
next_sunday = {
    'SUN': 7,
    'MON': 6,
    'TUE': 5,
    'WED': 4,
    'THU': 3,
    'FRI': 2,
    'SAT': 1,
}

print(next_sunday[input()])
# Judge status: Accepted
import math
mod=10**9+7

def framod(n, mod, a=1):
    for i in range(1,n+1):
        a=a * i % mod
    return a

def comb(n, r, mod = 10**9 + 7):
    return ( framod(n,mod) * pow(framod(n-r,mod),mod-2,mod ) * pow(framod(r,mod),mod-2,mod))
X,Y=map(int,input().split())
if (X + Y) % 3 ==0:
  s,t= ( 2*X - Y ) // 3 , (2*Y - X) // 3
  if s*t<0:
    print(0)
  else:
    print(comb(s+t,s) % mod)
else:
  print(0)
# Judge status: Accepted
s = input()
t = input()

if t[:-1] == s:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import itertools
import sys
input = sys.stdin.readline

X, Y = map(int, input().split())
a = X
ans = 0
for i in itertools.count(1):
    if a <= Y:
        ans += 1
        a = a*2
    else:
        break
print(ans)
# Judge status: Wrong Answer
n,m=map(int,input().split()) 
q=input() 
l=[list(map(int,input().split())) for _ in range(m)] 
print(n,m,q,l) 

ans=0 
cnt=0 
lst_j=[0]*(n-1) 
for i in range(n-1): 
	if q[i]+q[i+1]=="AC": 
		cnt=1 
		lst_j[i]=cnt 
		cnt=0 
	for i,j in l: 
		ans=lst_j[i-1:j-1].count(1) 
		print(ans)
# Judge status: Accepted
def dfs(i, count, res):
    global ans
    if i == n:
        if min(count) < x:
            return
        ans = min(ans, res)
        return ans
    else:
        dfs(i+1, count, res)
        dfs(i+1, [count[k-1] + l[i][k] for k in range(1, m+1)], res + l[i][0])


n, m, x = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

ans = 10 ** 9
dfs(0, [0] * m, 0)

if ans == 10 ** 9:
    print(-1)
else:
    print(ans)
# Judge status: Accepted
import sys
 
readline = sys.stdin.buffer.readline
 
N,A,B = map(int, readline().split())
 
div,mod =divmod(N, A+B)
 
if div < 1:
  if N > A:
    print(A)
  else:
    print(N)
else:
  if mod > A:
    print(A*div + A)
  else:
    print(A*div + mod)
# Judge status: Accepted
n = int(input())
for i in range(int(n**0.5),0,-1):
  if n%i < 1:
    print(i+n//i-2)
    break
# Judge status: Accepted
n = int(input())
a = sorted(list(map(int, input().split())),reverse=True)
d = {}
for i in a:
  try:d[i] += 1
  except:d[i] = 1

ans = 0
t = 0
for i in d:
  if(d[i] >= 4 and ans == 0):print(i*i);exit()
  if(d[i] >= 2 and ans == 2):print(t*i);exit()
  if(d[i] >= 2 and ans == 0):t=i;ans=2
print(0)
# Judge status: Wrong Answer
x,y = map(int,input().split())
s = (2 * y -x) / 3
t = (2 * x -y) / 3
if s.is_integer() and t.is_integer():
    def comb(n, r, mod=10 ** 9 + 7):
        a = 1
        b = 1
        r = min(r, n - r)
        for i in range(r):
            a = a * (n - i) % mod
            b = b * (i + 1) % mod
        return a * pow(b, mod - 2, mod) % mod
    s = int(s)
    t = int(t)
    print(comb(s + t, t, mod=10 ** 9 + 7))
else:
    print(0)
# Judge status: Accepted
n = int(input())
c = input()
p = []
for i in range(n):
  if c[i]=='R':
    p += [i]
print(len([1 for i in p if i>=len(p)]))
# Judge status: Accepted
n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
e = 0
f= False
for i in range(n):
    if s[i]=="a":
        if c<d:
            f=True
    elif s[i]=="b":
        if c<d and e<y:
            f=True
            e+=1
    if f:
        print("Yes")
        c+=1
    else:
        print("No")
    f=False
# Judge status: Accepted
N = int(input())
P = list(map(int, input().split()))

count = 0

for i in range(N):
  if P[i] == i + 1:
    if i + 1 == N:
      P[i - 1], P[i] = P[i], P[i - 1]      
    else:
      P[i], P[i + 1] = P[i + 1], P[i]
    count += 1

print(count)
# Judge status: Accepted
from collections import defaultdict

N = int(input())
Ts = list(set([int(input()) for _ in range(N)]))

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

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

res = Ts[0]
for T in Ts:
    res = lcm(res, T)
print(int(res))
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
ans = 0

for i in range(0, n, 2):
    if a[i]%2 == 1:
        ans += 1

print(ans)
# Judge status: Accepted
n = int(input())
l = list(map(int,input().split()))
a = 10**9
ans = 0
for i in range(n):
    if l[i] <= a:
        ans += 1
        a = l[i]
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  a[i]-=i
a.sort()
print((a[n//2]+a[(n-1)//2])//2)
# Judge status: Accepted
def actual(N):
    for i in range(1, 10 ** 9 + 1):
        if i ** 2 > N:
            return (i - 1) ** 2

N = int(input())
print(actual(N))
# Judge status: Wrong Answer
s=input()
a=[]
b=[]
d=0
for i in range(int(input())):
  q=input()
  if q=="1":d^=1
  else:
    _,f,c=q.split()
    f=int(f)-1
    if d^f==0:a.append(c)
    else:b.append(c)
if d==0:print("".join(a)[::-1]+s+"".join(b))
else:print("".join(b)[::-1]+s+"".join(a))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n-1):
    if a[i+1]-a[i]>0:
        count+=a[i+1]-a[i]
print(count)
# Judge status: Wrong Answer
import math
a,b,c=map(int,input().split())
if math.sqrt(a)+math.sqrt(b)<math.sqrt(c):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer

n = int(input())
data = ["a"] * n
ans = ["".join(data)]
def print_str(ans, data, i):
    if i == n:
        return
    while ord(data[i]) + 1 <= ord(data[i - 1]) + 1:
        data[i] = chr(ord(data[i]) + 1)
        ans.append("".join(data))
        print_str(ans, data, i + 1)
    data = ["a"] * n
    print_str(ans, data, i + 1)
print_str(ans, data, 1)
ans = sorted(set(ans))
for i in range(len(ans)):
    print(ans[i])
# Judge status: Wrong Answer
d,t,s = map(int,input().split())
if d//s <=t:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
x,y = map(int,input().split())
if y%x==0:
  print(-1)
else:
  print(x)
# Judge status: Accepted
n,m=map(int,input().split())
if n>m//2:
    print(m//2)
else:
    ans=n
    tmp=m-(n*2)
    ans+=tmp//4
    print(ans)
# Judge status: Wrong Answer
N,K,x,y = [int(input()) for i in range(4)]

print((N-K)*y + K*x)
# Judge status: Accepted
n, m, k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        ans = i*m + j*n - i*j*2
        if ans == k:
            print("Yes")
            exit()

print("No")
# Judge status: Wrong Answer
a = list(input())
print(a)
flag = 0
for i in range(3):
    if a[i] == a[i+1]:
        flag = 1
if flag == 1:
    print('Bad')
else:
    print('Good')
# Judge status: Accepted
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')
# Judge status: Wrong Answer
n,a,b=map(int,input().split(' '))
comb=0


for i in range(n):
    delta=1
    for j in range(i):
        delta=delta*(n-j)/(j+1)
    if i!=a and i!=b:
        comb=comb+delta

if comb<10**9+7:
    print(int(comb))
else:
    print(int(comb)%10**9)
# Judge status: Accepted
L, R, d = [int(n) for n in input().split(' ')]

num = [n for n in range(L, R+1) if n%d==0]

print(len(num))
# Judge status: Accepted
n = int(input())

for i in range(1,100):
  if i*1000 >= n:
    print(i*1000-n)
    break
# Judge status: Accepted
a, b, c, d = map(int, input().split())
if abs(a-c) <= d:
    print("Yes")
elif abs(a-c) > d:
    if abs(a-b) <= d and abs(b-c) <= d:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b=map(int, input().split())
    print(-(-(a+b) // 2))
resolve()
# Judge status: Wrong Answer
from scipy.special import comb
N = int(input())

if N == 3:
  print(1)
elif N < 2:
  print(0)
else:
  i = 1
  ans = 1
  while True:
    a = N - ((i + 1) * 3)
    if a <= 0:
      print(ans)
      break
    b = comb(a + i, i, exact=True)
    ans += b 
    ans %= (10 ** 9 + 7)
    i += 1
# Judge status: Accepted
x = int(input())
print(1 if x == 0 else 0)
# Judge status: Wrong Answer
import sys
input=sys.stdin.readline
s=input()
ans=0
num=0
while num<len(s)-1:
    if s[num]!=s[num+1]:
        s=s[:num]+s[num+2:]
        num-=1
        ans+=2
    else:
        num+=1
print(ans)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n):
    a[i]+=a[i-1]
ABS=10**15
for i in range(n-1):
    ABS=min(abs(a[-1]-2*a[i]),ABS)
print(ABS)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(a):
    for j in range(b):
        for k in range(c):
            if 500 * i + 100 * j + 50 * k == x:
                ans += 1
print(ans)
# Judge status: Accepted
n, sum = map(int, input().split())
for x in range(n + 1):
    for y in range(n - x + 1):
        if x * 10000 + y * 5000 + (n-x-y) * 1000 == sum:
            print(x, y, n-x-y)
            exit()

print(-1, -1, -1)
# Judge status: Wrong Answer
s=input()
if s[0] == '0':
    if s[-2] == '0':
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif s[-2] == '0':
    print("YYMM")
else:
    print("NA")
# Judge status: Accepted
initial_input_num_of_str = input()
double_eyes_list = ['00']

# 4桁の数字を、３つに分ける。最初２文字、真ん中２文字、後ろ２文字
first_numbers = initial_input_num_of_str[0:2]
center_numbers = initial_input_num_of_str[1:3]
last_numbers = initial_input_num_of_str[-2:]

for i in range(11, 100, 11):
    double_eyes_list.append(str(i))

if first_numbers in double_eyes_list:
    print('Bad')
elif center_numbers in double_eyes_list:
    print('Bad')
elif last_numbers in double_eyes_list:
    print('Bad')
else:
    print('Good')
# Judge status: Accepted
A,B,C = map(int, input().split())
K = int(input())
ctr = 0
while B <= A:
    B *= 2
    ctr += 1
while C <= B:
    C *= 2
    ctr += 1
print('Yes' if K >= ctr else 'No')
# Judge status: Wrong Answer
W, H, x, y = map(int, input().split())
print(W*H//2, int(2*x == W and 2*y == H))
# Judge status: Wrong Answer
def main():
    N = [int(_) for _ in input().split()]
    tmpA = N[0]
    tmpB = N[0]
    tmpC = N[0]
    print(N[2], N[1], N[0]) 



if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import math
x,y=map(int,input().split())
print(math.floor(math.log2(y/x))+1)
# Judge status: Accepted
a, b = map(int, input().split())
out = "Yes" if a == b else "No"
print(out)
# Judge status: Wrong Answer
S = input()

# 高々2^3=8通りなので、全て考慮すればよい
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' and S =='RSR' and S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
  
print(ans)
# Judge status: Wrong Answer
a,b,c,k=map(int, input().split())

ans = a
cnt = k-a
if cnt <=0:
    print(a)
    exit()
cnt = cnt -b
if cnt <= 0:
    print(a)
    exit()
ans = ans-cnt

print(ans)
# Judge status: Accepted
from collections import defaultdict
n = int(input())
d = list(map(int,input().split()))
dic = defaultdict(int)
ans = 1
mod = 998244353
for i in range(n):
    dic[d[i]] += 1
if dic[0] == 1 and d[0] == 0:
    for i in range(n):
        if not (dic[i] == 0 and dic[i+1] == 0):
            ans *= dic[i]**dic[i+1] % mod
            ans %= mod
    print(ans)
else:
    print(0)
# Judge status: Wrong Answer
q,h,s,d=map(int,input().split())
n=int(input())
 
l=min(q*n*8,h*n*4,s*n*2,d*n)
if l != d*n:
    print(int(l/2))
else:
    m=min(q*4,h*2,s)
    print(int((d*(n-1)//2)+m) if n%2==1 else int(l/2))
# Judge status: Accepted
x = []
y = []
ans = []
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
for i in range(len(x)):
    if x[i] % 10 == 0:
        y.append(x[i])
    else:
        y.append(10 * (x[i] // 10 + 1))
for i in range(len(x)):
    tmp = 0
    tmp = x[i] + sum(y) -y[i]
    ans.append(tmp)
print(min(ans))
# Judge status: Accepted
n = int(input())
a = n//1.08

if int((a-1)*1.08) == n:
  print(int(a-1))
elif int(a*1.08) == n:
  print(int(a))
elif int((a+1)*1.08) == n:
  print(int(a+1))
else:
  print(':(')
# Judge status: Accepted
n, m = map(int, input().split())
cnt = 0
lst = []
for _ in range(n):
    a,b = map(int, input().split())
    lst.append((a,b))
lst.sort()
for val in lst:
    cnt += val[1]
    if cnt >= m:
        print(val[0])
        break
# Judge status: Accepted
s = input()
sgn = 1
Q = int(input())
L = '' #sgn=-1
R = '' #sgn=1
for _ in range(Q):
  i = input()
  if i[0] == '1':
    sgn*=-1
  else:
    if i[2] == '1':
      if sgn == 1:
        L += i[4]
      else:
        R += i[4]
    else:
      if sgn == 1:
        R += i[4]
      else:
        L += i[4]

if sgn == -1:
  s = s[::-1]
  R = R[::-1]
  print(R + s +L)
  
else:
  L = L[::-1]
  print(L + s + R)
# Judge status: Accepted
N=int(input())
a_list = list(map(int,input().split()))

#累積和を作成
s_list=[0]
sum=0
for i in a_list:
    sum+=i
    s_list.append(sum)

#print(s_list)

target=s_list[-1]//2

tmp1=10**10
for i in range(1,N):
    tmp2=abs(target-s_list[i])
    tmp1=min(tmp1,tmp2)#より小さいほうをtmp1に格納
    if tmp1 == tmp2:
        ans_index=i

#print(ans_index)
print(abs(s_list[-1]-2*s_list[ans_index]))
# Judge status: Wrong Answer
S = input()
ans = ""
flag = 0
for s in S[::-1]:
  if s == "B":
    flag += 1
    continue
  if flag:
    flag -= 1
    continue
  ans += s
print(ans)
# Judge status: Wrong Answer
n = input()
mlist = [i*4+j*7 for i in range(0,25) for j in range(0,15)]
if n in mlist:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
n, k = map(int, input().split())
a = list(map(int, input().split()))


fi = 0
for i in range(n):
    if a[i] == 1:
        fi = i
        break

print((n - fi) // (k - 1) + fi // (k - 1))
# Judge status: Wrong Answer
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
for i in range(a//2):
  if s[i]!=s[a-1-i]:
    count+=1
    
for i in range((n-b+1)//2):
  if s[-(i+1)]!=s[b-1-i]:
    count+=1
    
if count!=0:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
A,B =map(int, input().split())
print(A*B)