Harryxun/stf_run huggingface dataset:
w,h,x,y=map(int,input().split())
if x!=0 and x!=w and y!=0 and y!=h:
 a=min(w-x,x)
 b=min(y,h-y)
 ans1=max(a*h,b*w)
 if a*h==b*w:
  ans2=1
 else:
  ans2=0
 print(ans1,ans2)
else:
  break

### FIXED CODE ###

w,h,x,y=map(int,input().split())
ans1=w*h/2
if w/2==x and  h/2==y:
 ans2=1
else:
 ans2=0
print(ans1,ans2)
def main():
    N = int(input())
    ans = ""

    while N > 26:
        tmp = N % 26
        txt = "z" if tmp == 0 else chr(tmp + 96)
        ans += txt
        print(f"{ans = }. {N = }")
        N //= 26
    else:
        txt = "z" if tmp == 0 else chr(tmp + 96)
        ans += txt

    print(ans[::-1])


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N = int(input())
    ans = ""

    while N:
        N -= 1
        tmp = N % 26
        ans += chr(tmp + ord("a"))
        N //= 26

    print(ans[::-1])


if __name__ == '__main__':
    main()
import sys
sys.setrecursionlimit(2147483647)
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
input = lambda:sys.stdin.readline().rstrip()
from functools import cmp_to_key
def cmp(store1, store2):
    if store1 == store2:
        return 0
    a1, b1 = store1
    a2, b2 = store2
    return -1 if a2 * b1 <= a1 * b2 else 1

def resolve():
    n, T = map(int, input().split())
    assert n <= 3000
    AB = [tuple(map(int, input().split())) for _ in range(n)]
    AB.sort(key = cmp_to_key(cmp))

    # dp[i][j] : i まで見て j 個到達するまでに掛かる最短時間
    dp = [T + 1] * (n + 1)
    dp[0] = 0
    for a, b in AB:
        for i in range(n - 1, -1, -1):
            t = dp[i]
            dp[i + 1] = min(dp[i + 1], (a + 1) * (t + 1) + b)
        # print(a, b, dp)

    for i in range(n, -1, -1):
        if dp[i] <= T:
            print(i)
            return
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(2147483647)
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
input = lambda:sys.stdin.readline().rstrip()
from bisect import bisect_right
from itertools import accumulate
from functools import cmp_to_key

def cmp(store1, store2):
    if store1 == store2:
        return 0
    a1, b1 = store1
    a2, b2 = store2
    return -1 if a2 * (b1 + 1) <= a1 * (b2 + 1) else 1

def resolve():
    n, T = map(int, input().split())
    AB = []
    zero = []
    for _ in range(n):
        a, b = map(int, input().split())
        if a != 0:
            AB.append((a, b))
        else:
            zero.append(b + 1)

    AB.sort(key = cmp_to_key(cmp))
    zero.sort()
    zero = list(accumulate(zero))

    max_store = 30
    dp = [T + 1] * max_store
    dp[0] = 0
    for a, b in AB:
        for i in range(max_store - 2, -1, -1):
            t = dp[i]
            dp[i + 1] = min(dp[i + 1], (a + 1) * (t + 1) + b)

    res = 0
    for i in range(max_store):
        t = dp[i]
        if t > T:
            break
        rest = T - t
        res = max(res, i + bisect_right(zero, rest))

    print(res)
resolve()
s = input()
K = int(input())

n = len(s)

ex = [s[:min(K, n)]]
for i in range(n):
    if i + K - 1 < n:
        if ex[0] > s[i:i+K]:
            ex[0] = s[i:i+K]
    else:
        if ex[0][:n-i] > s[i:]:
            ex.insert(0, s[i:])


if K > len(ex[-1]):
    for i in range(len(ex[0])):
        for j in range(i+1, len(ex[0])+1):
            ex.append(ex[0][i:j])
    ex = set(ex)
    ex = sorted(list(ex))
    print(ex[K-1])
else:
    print(ex[-1])

### FIXED CODE ###

s = input()
K = int(input())

n = len(s)

ex = [s[:min(K, n)]]
for i in range(n):
    if i + K - 1 < n:
        if ex[0] > s[i:i+K]:
            ex[0] = s[i:i+K]
    else:
        if ex[0][:n-i] > s[i:]:
            ex.insert(0, s[i:])


for n in range(len(ex)):
    for i in range(len(ex[n])):
        for j in range(i+1, len(ex[n])+1):
            ex.append(ex[n][i:j])

ex = set(ex)
ex = sorted(list(ex))

print(ex[K-1])
n,h,w=map(int, input() for i in range(3))
 
print( (n - h + 1) * (n - w + 1))

### FIXED CODE ###

n=int(input())
h=int(input())
w=int(input())

print( (n - h + 1) * (n - w + 1))
import numpy as np
import copy
N,K = map(int,input().split())
V = list(map(int,input().split()))
# N = 17
# K = 100
# V = [i for i in range(N)]


V = [0 for i in range(N)] + V + [0 for i in range(N)] 


dp = {}

# discardフラグを立てて，一度捨てると取れないように．
def search(start, end, k, own, discard=False):
    if k==K:
        return sum(own)
    key = tuple(own)
    if key in dp:
        return dp[key]
    val_Default = sum(own)
    val_A,val_B = 0,0
    if end-start >= 0 and not discard:
        val_A = search(start+1, end, k+1, own + [V[start]])
        val_B = search(start, end-1, k+1, own + [V[end]])
    if len(own) == 0 and discard:
        return val_Default
    val_Cs = []
    val_Ds = []
    for i,o in enumerate(own):
        own_new = copy.copy(own)
        own_new.pop(i)
        val_Cs.append(search(-1, -1, k+1, own_new, discard=True) )
        # val_Cs.append(search(start-1, end, k+1, own_new, discard=True) )
        # val_Ds.append(search(start, end+1, k+1, own_new, discard=True) )
    # print([val_Default, val_A, val_B], val_Cs , val_Ds)
    # dp[key] = max([val_Default, val_A, val_B] + val_Cs + val_Ds)
    dp[key] = max([val_Default, val_A, val_B] + val_Cs)
    # print(own, [val_Default, val_A, val_B], val_Cs, val_Ds)
    return dp[key]

r = search(N, 2*N-1, 0, [])
print(r)



### FIXED CODE ###

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

sumval = 0
for l in range(min(K+1,N+1)):
    for r in range(min(K+1-l,N-l+1)):
        sV = sorted(V[:l]+ V[N-r:])
        # i_div = 0
        # for i_div in range(len(sV)):
        #     if sV[i_div] > 0:
        #         break
        # for sute in range(min(K-r-l+1,len(sV),i_div+1)):
        for sute in range(min(K-r-l+1,len(sV))):
            c = sum(sV[sute:])
            sumval = max(c,sumval)

print(sumval)
a=int(input())
b=int(input())

if a*b%2:
    print('Odd')
else:
    print('Even')



### FIXED CODE ###

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

if a*b%2:
    print('Odd')
else:
    print('Even')
n = int(input().strip())
d = list(map(int, input().split()))
h = [0] * n
for x in d:
  h[x] += 1

ans = 1
mod = 998244353
for i in range(1, n):
  ans = (ans * pow(h[i-1], h[i], mod)) % mod

if h[0] != 1 || d[0] != 0:
  ans = 0

print (ans)


### FIXED CODE ###

n = int(input().strip())
d = list(map(int, input().split()))
h = [0] * n
for x in d:
  h[x] += 1

ans = 1
mod = 998244353
for i in range(1, n):
  ans = (ans * pow(h[i-1], h[i], mod)) % mod

if h[0] != 1 or d[0] != 0:
  ans = 0

print (ans)
N,K=map(int,input().split())
N=list(map(int,input().split()))
a={}
 
b=1
a[1]=1
count=0
while(count<=K):
  count+=1
  b=N[b-1]
  #print(b)
  if b in a:
    print(a)
    print(b)
    print(count)
    cycle=count-a[b]
    rest=K-count+1
    ans=rest%cycle
    for i in range(ans-1):
      b=N[b-1]
    print(b)
    break
  a[b]=count

print(b)

### FIXED CODE ###

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

count=0
k=1
countlist={}
#countlist[1]=A[0]
count=1
while True:    
    k=A[k-1]
    
    if k in countlist:
        cycle=count-countlist[k]
        rest=K-count
        move=rest%cycle
        for i in range(min(rest,move)):
            k=A[k-1]
        print(k)
        break
    
    countlist[k]=count
    
    if count==K:
        print(k)
        break
    
    count+=1
import sympy
 
n,p=map(int,input().split())
 
def C(N,P):
    if N == 1: return P
    
    prime=2
    prime_list={}
    while P >= prime :
        if P % prime == 0:
            P /= prime
            if prime in prime_list:
                prime_list[prime]+=1
            else:
                prime_list[prime]=1
        else :
            prime+=1
    
    print(prime_list)
    res=1
    for b,c in prime_list.items() :
        if c >= 4 : res *= b
    return res
 
print(C(n,p))

### FIXED CODE ###

n,p = list(map(int,input().split())) 
i = a = o = 1
m = round(p**(1/n))
for i in range(m,0,-1):
    a = i**n
    if p%a==0:
        print(i)
        exit()
N,M,C = map(int, input().split())
B = map(int, input().split())
A = [[0 for i in range(M)] for j in range(N)]

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

ans = 0

for i in range(N):
	tmp = 0
	for n in range(M):
		tmp += A[i][n]*B[n]
	if(tmp+C>0):
		ans += 1

print(ans)


### FIXED CODE ###

N,M,C = list(map(int, input().split()))
B = list(map(int, input().split()))
A = []

for i in range(N):
	A.append(list(map(int, input().split())))

ans = 0

for i in range(N):
	tmp = 0
	for j in range(M):
		tmp = tmp + A[i][j]*B[j]
	if(tmp+C>0):
		ans += 1

print(ans)
from collections import Counter

s = input()

cnt = Counter(s)

if len(cnt.keys()) == 1:
    print(0)
    
else:
    al_set = set(s)
    c = list(s)
    
    dic = {}
    for alpha in al_set:
        c_prev = [ci for ci in c]
        count = 0
        while any([ci != alpha for ci in c_prev]):
            c_new = []
            for j in range(len(c_prev) - 1):
                if c_prev[j] == alpha or c_prev[j+1] == alpha:
                    c_new.append(alpha)
                else:
                    c_new.append("0")
                    
            c_prev = c_new
            count += 1

            
        dic[alpha] = count
        
print(min(dic.values()))
            

### FIXED CODE ###

from collections import Counter

s = input()

cnt = Counter(s)

if len(cnt.keys()) == 1:
    print(0)
    
else:
    al_set = set(s)
    c = list(s)
    
    dic = {}
    for alpha in al_set:
        c_prev = [ci for ci in c]
        count = 0
        while any([ci != alpha for ci in c_prev]):
            c_new = []
            for j in range(len(c_prev) - 1):
                if c_prev[j] == alpha or c_prev[j+1] == alpha:
                    c_new.append(alpha)
                else:
                    c_new.append("0")
                    
            c_prev = c_new
            count += 1

            
        dic[alpha] = count
        
    print(min(dic.values()))
N = input()
S = input()
print("Yes" if N%2 == 0 and S[:(N/2)+1] == S[(N/2)+1:N+1])

### FIXED CODE ###

N = int(input())
S = input()
print("Yes" if S[:N//2] == S[N//2:N] else "No")
N = int(input())
if N == 7:
  print(-1)
else:
  print(1/0)

### FIXED CODE ###

def GCD(x,y):
    if y == 0:
        return x
    else:
        return GCD(y,x%y)


N = int(input())
if N == 2:
    print(-1)
    exit()
if N == 7:
    ans = [".aaggcc",
           "c..ddee",
           "c..ffgg",
           "hij....",
           "hij....",
           "klm....",
           "klm...."]
    for i in ans:
        print("".join(i))
    exit()
if N == 3:
    print(".aa")
    print("a..")
    print("a..")
    exit()

four = ["aacd",
        "bbcd",
        "efgg",
        "efhh"]
five = ["aabbc",
        "h.iic",
        "hj..d",
        "gj..d",
        "gffee"]
six = ["aacd..",
       "bbcd..",
       "ef..gg",
       "ef..hh",
       "..iikl",
       "..jjkl"]
ans = [list("."*N) for i in range(N)]
a,b,c = [[0,N//5,0],[0,N//5-1,1],[0,N//5-2,2],[2,N//5-1,0],[1,N//5,0]][N%5]
p = 0
for i in range(a):
    for x in range(4):
        for y in range(4):
            ans[p+x][p+y] = four[x][y]
    p += 4

for i in range(b):
    for x in range(5):
        for y in range(5):
            ans[p+x][p+y] = five[x][y]
    p += 5

for i in range(c):
    for x in range(6):
        for y in range(6):
            ans[p+x][p+y] = six[x][y]
    p += 6
for i in ans:
    print("".join(i))
N = int(input())
p = input()
list1 = list(map(int,p.split()))

list2 = []
for i in range(1,N + 1):
    list2.append(i)

if list1 == list2:
    print("YES")
    sys.exit()
for i in range(0,N):
    if list1[i] != i+1:
        if i+1 == list1[list1[i]-1]:
            list1[list1[i]-1] = list1[i]
            list1[i] = i+1
            

        if list1 == list2:
            print("YES")
            sys.exit()
        else:
            print("NO")
            sys.exit()

### FIXED CODE ###

import sys
N = int(input())
p = input()
list1 = list(map(int,p.split()))

list2 = []
for i in range(1,N + 1):
    list2.append(i)

if list1 == list2:
    print("YES")
    sys.exit()
for i in range(0,N):
    if list1[i] != i+1:
        if i+1 == list1[list1[i]-1]:
            list1[list1[i]-1] = list1[i]
            list1[i] = i+1
            

        if list1 == list2:
            print("YES")
            sys.exit()
        else:
            print("NO")
            sys.exit()
import math
l=input().split()
x1=int(l[0])
y1=int(l[1])
x2=int(l[2])
y2=int(l[3])

A=math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
print(A)



### FIXED CODE ###

import math
l=input().split()
x1=float(l[0])
y1=float(l[1])
x2=float(l[2])
y2=float(l[3])

A=math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
print(A)
S = input()
cnt=0
ans = 0
sets = {A,T,C,G}
for s in S:
  if s in sets:
    cnt += 1
  else:
    ans = max(ans,cnt)
    cnt = 0
print(ans)

### FIXED CODE ###

S = input()
cnt=0
ans = 0
sets = {"A","T","C","G"}
for s in S:
  if s in sets:
    cnt += 1
  else:
    ans = max(ans,cnt)
    cnt = 0
ans = max(ans,cnt)
print(ans)
N = int(input())						# 5
b = list( map(int, input().split()) )
a = []

#print("N", N)
#print("b", b)

big = 0
#でかいのを除外する
for i in b:
	if i <= 10000:
		a.append(i)
	else:
		big += 1

if len(a) == 0:
	print(big)
	exit(0)

l=[0]*( max(a) +1)


for i in b:
	l[i] += 1

#print("l", l)

ans=big

for i in range( len(l) ):
	if l[i] == 0: continue
	if l[i] == i: continue
	
	x=1000000000 + 1
	y=1000000000 + 1
	if l[i] > i: x = l[i] - i
	if l[i] < i: y = l[i]
	
	ans += min(x, y)
	

print(ans)




### FIXED CODE ###

N = int(input())						# 5
a = list( map(int, input().split()) )


from collections import defaultdict
d = defaultdict(int)


for i in a:
	d[i] += 1

#print(d)

ans = 0
for i in d.keys():
	x = d[i]
#	print(i, x)
	if x == i: continue
	if x < i: ans += x
	if x > i: ans += (x - i)

#print(d)
print(ans)
INFTY = 10**8+10
N,M = map(int,input().split())
A = {}
for i in range(1,M+1):
    a,b = map(int,input().split())
    C = list(map(int,input().split()))
    A[i] = (a,C)
C = {}
for i in range(1,M+1):
    for j in A[i][1]:
        if j not in C:
            C[j] = 0
        C[j] += 1
if len(C)==N:
    dp = [[INFTY for _ in range(2**N)] for _ in range(M+1)]
    dp[0][0] = 0
    for i in range(1,M+1):
        for S in range(2**N):
            dp[i][S] = dp[i-1][S]
            for a in A[i][1]:
                dp[i][S] = min(dp[i-1][S&~a]+A[i][0])
    print(dp[M,2**N-1])
else:
    print(-1)

### FIXED CODE ###

from itertools import product
N,M = map(int,input().split())
G = {i:[] for i in range(M)}
for i in range(M):
    a,b = map(int,input().split())
    G[i] = [a,list(map(int,input().split()))]
INFTY = 10**11
dp = [[INFTY for S in range(2**N)] for _ in range(M+1)]
for j in range(M+1):
    dp[j][0] = 0
for j in range(M):
    for S in range(2**N):
        y = 0
        for x in G[j][1]:
            y += 2**(x-1)
        dp[j+1][S] = min(dp[j][S],dp[j][S&(~y)]+G[j][0])
a =dp[M][2**N-1]
if a>=INFTY:
    print(-1)
else:
    print(a)
a, b, c, k = map(int, input().split())

if a >= k:
  print(k)
elif a + b >= k:
  print(a)
else:
  print(a - (k - a - b)
    

### FIXED CODE ###

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

if a >= k:
  print(k)
elif a + b >= k:
  print(a)
else:
  print(a - (k - a - b))
x = input()

print(x*x*x)

### FIXED CODE ###

x = int(input())

print(x*x*x)
N = int(input())
def prime_dict(n):
    a = {}
    if n%2 == 0:
        a[2] = 1
        n//=2
        exp2 = 2
    while n%(2**exp2) == 0 and (n >= 2**exp2):
        a[2] += 1
        n //= 2**exp2
        exp2 += 1
    while n%2 == 0:
        n //= 2
    f = 3
    expn = 1
    while f**expn <= n:
        while f**expn <= n:
            if n%(f**expn) == 0:
                if f not in a:
                    a[f] = 1
                else:
                    a[f] += 1
                n //= f**expn
            expn += 1
        while n%f == 0 and n >= f:
            n //= f
        f += 2
        expn = 1
    if n!= 1:
        a[n] = 1
    return a

primes = prime_dict(N)
ans = sum(primes.values())
print(ans)



### FIXED CODE ###

from collections import Counter
N = int(input())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
ans = 0
primes = prime_factorize(N)
pc = Counter(primes)
for v in pc.values():
    now = 1
    while now*(now+1)//2 <= v:
        now += 1
    ans += now-1
print(ans)
n,k,q=map(int,input().split())
l=[int(input().split()) for i in range(q)]

for i in range(1,n+1):
  ans=k
  for que in l:
    if que!=i:
      ans-=1
  if ans<=0:
    print("No")
  else:
    print("Yes")
  


### FIXED CODE ###

from collections import Counter

n,k,q=map(int,input().split())
l=[int(input()) for i in range(q)]

l_c=Counter(l)

for i in range(1,n+1):
  ok=l_c[i]
  num=k-q+ok
  if num>0:
    print("Yes")
  else:
    print("No")
import sys
from math import gcd
from functools import reduce

MOD = 1000000007
lcm = lambda x, y: (x*y)//gcd(x,y)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
l = reduce(lcm, a)
ans = 0
for x in a:
    ans += l//x
print(ans%MOD)




### FIXED CODE ###

import sys
from fractions import gcd
from functools import reduce

MOD = 1000000007
lcm = lambda x, y: (x*y)//gcd(x,y)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
l = reduce(lcm, a)
ans = 0
for x in a:
    ans += l//x
print(ans%MOD)
n = int(input())
a = [list(input()) for i range(n)]
cnt = 0
cnt_A=0
cnt_B=0
cnt_C=0
for i in range(n):
  if "AB" in a[i]:
    cnt+= 1
for i in range(n):
  if a[i][-1] == "A" and a[i][0] =="B":
    cnt_C+=1  
  elif a[i][-1] == "A" and a[i][0] !="B":
    cnt_A +=1
  elif a[i][0] =="B"and a[i][-1] !="A":
    cnt_B+=1

print(cnt+cnt_A+cnt_B+cnt_C)


### FIXED CODE ###

n=int(input())
ans=0
a=0;b=0;ab=0
for i in range(n):
  s=input()
  ans+=s.count("AB")
  if s[0]=="B":
    b+=1
    if s[-1]=="A":
      ab+=1
      b-=1
  elif s[-1]=="A":
    a+=1
if a+b==0:
    print(ans+max(ab-1,0))
else:
    print(ans+min(a,b)+ab)
import sys
input = sys.stdin.readline


def main():
    a, b = [float(i) * 100 for i in input().split()]
    print((a ** b) // 100)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import decimal
import sys
input = sys.stdin.readline


def main():
    a, b = [decimal.Decimal(i) for i in input().split()]
    ans = a * b
    print(int(ans))


if __name__ == '__main__':
    main()
N = int(input())
List = input()
List = list(List)

a = 0

for n in range(N):
  if List[n] == 'A':
    if List[n + 1] == 'B':
      if List[n + 2] == 'C':
        a += 1
        
print(a)
        

### FIXED CODE ###

N = int(input())
List = input()
List = list(List)

a = 0

for n in range(N - 2):
  if List[n] == 'A':
    if List[n + 1] == 'B':
      if List[n + 2] == 'C':
        a += 1
        
print(a)
#coding:utf-8

n = int(input())

nums = list(map(int,input()))
sorted(nums, reverse=True)
diff = 0
for i in range(n):
  if i % 2 == 0:
    diff += num[i]
  else:
    diff -= num[i]
print(diff)

### FIXED CODE ###

#coding:utf-8

n = int(input())

nums = list(map(int,input().split(' ')))
nums = sorted(nums, reverse=True)
diff = 0
for i in range(n):
  if i % 2 == 0:
    diff += nums[i]
  else:
    diff -= nums[i]
print(diff)
N, W = map(int, input().split())
w, v = [0] * N, [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())


def simple_dp():
    dp = [[-1] * (W + 1) for _ in range(N + 1)]
    dp[0][0] = 0
    for i in range(N):
        for j in [0] + list(range(w[0], min(100 * (w[0] + 3), W + 1))):
            if dp[i][j] < 0:
                continue
            if j + w[i] <= W:
                dp[i + 1][j + w[i]] = max(dp[i + 1][j + w[i]], dp[i][j] + v[i])
            dp[i + 1][j] = max(dp[i + 1][j], dp[i][j])

    ans = 0
    for i in range(W + 1):
        ans = max(ans, dp[N][i])
    return ans

print(simple_dp())


### FIXED CODE ###

N, W = map(int, input().split())  # N<=100, W<=10**9
w, v = [0] * N, [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())  # すべての i=2,3,…,N について、w1 ≦ wi ≦ w1+3

#

def kaihou():
    monos_by_omosa = [[] for _ in range(4)]
    w0 = w[0]
    for i in range(N):
        monos_by_omosa[w[i] - w0].append(v[i])
    for i in range(4):
        monos_by_omosa[i].sort()
        monos_by_omosa[i].reverse()
    # print(monos_by_omosa)
    ans = 0
    for i in range(N + 1):
        if i > len(monos_by_omosa[0]):
            break
        w0i = (w0) * i
        if w0i > W:
            break

        for j in range(N + 1 - i):
            if j > len(monos_by_omosa[1]):
                break
            w1j = (w0 + 1) * j
            if w0i + w1j > W:
                break

            for k in range(N + 1 - i - j):
                if k > len(monos_by_omosa[2]):
                    break
                w2k  = (w0 + 2) * k
                if w0i + w1j + w2k > W:
                    break

                for l in range(N + 1 - i - j - k):
                    if l > len(monos_by_omosa[3]):
                        break
                    w3l = (w0 + 3) * l
                    if w0i + w1j + w2k + w3l > W:
                        break

                    val = sum(monos_by_omosa[0][:i])
                    val += sum(monos_by_omosa[1][:j])
                    val += sum(monos_by_omosa[2][:k])
                    val += sum(monos_by_omosa[3][:l])
                    ans = max(ans, val)
    return ans

print(kaihou())
N,M=input().split(' ')
N=int(N)
M=int(M)

x_arr=[]
y_arr=[]
z_arr=[]
for i in range(N):
	x,y,z=input().split(' ')
	x=int(x)
	y=int(y)
	z=int(z)
	x_arr.append(x)
	y_arr.append(y)
	z_arr.append(z)

ans_x=0
ans_y=0
ans_z=0
for i in range(M):
	kari_arr=[]
	for j in range(N-i):
		ans_x1=ans_x+x_arr[j]
		ans_y1=ans_y+y_arr[j]
		ans_z1=ans_z+z_arr[j]
		kari_arr.append(abs(ans_x1)+abs(ans_y1)+abs(ans_z1))
	print(kari_arr)
	index=kari_arr.index(max(kari_arr))
	ans_x=ans_x+x_arr[index]
	ans_y=ans_y+y_arr[index]
	ans_z=ans_z+z_arr[index]
	del x_arr[index]
	del y_arr[index]
	del z_arr[index]
	ans=abs(ans_x)+abs(ans_y)+abs(ans_z)
print(ans)


### FIXED CODE ###

import numpy as np

N,M=input().split(' ')
N=int(N)
M=int(M)

x_arr=[]
y_arr=[]
z_arr=[]
for i in range(N):
	x,y,z=input().split(' ')
	x=int(x)
	y=int(y)
	z=int(z)
	x_arr.append(x)
	y_arr.append(y)
	z_arr.append(z)

x_arr=np.array(x_arr)
y_arr=np.array(y_arr)
z_arr=np.array(z_arr)

xyz1=x_arr+y_arr+z_arr
xyz1=np.sort(xyz1)[::-1]
xyz1_sum=np.sum(xyz1[:M:])

xyz2=x_arr+y_arr-z_arr
xyz2=np.sort(xyz2)[::-1]
xyz2_sum=np.sum(xyz2[:M:])

xyz3=x_arr-y_arr-z_arr
xyz3=np.sort(xyz3)[::-1]
xyz3_sum=np.sum(xyz3[:M:])

xyz4=x_arr-y_arr+z_arr
xyz4=np.sort(xyz4)[::-1]
xyz4_sum=np.sum(xyz4[:M:])

xyz5=-x_arr-y_arr+z_arr
xyz5=np.sort(xyz5)[::-1]
xyz5_sum=np.sum(xyz5[:M:])

xyz6=-x_arr+y_arr+z_arr
xyz6=np.sort(xyz6)[::-1]
xyz6_sum=np.sum(xyz6[:M:])

xyz7=-x_arr+y_arr-z_arr
xyz7=np.sort(xyz7)[::-1]
xyz7_sum=np.sum(xyz7[:M:])

xyz8=-x_arr-y_arr-z_arr
xyz8=np.sort(xyz8)[::-1]
xyz8_sum=np.sum(xyz8[:M:])

a=[xyz1_sum,xyz2_sum,xyz3_sum,xyz4_sum,xyz5_sum,xyz6_sum,xyz7_sum,xyz8_sum]
print(max(a))
N, L = map(int, input().split())
S = [input() for i in range(L)]

print("axxcxxdxx")

### FIXED CODE ###

N, L = map(int, input().split())
S = [input() for i in range(N)]

print(''.join(sorted(S)))
S = input()
print(x * len(S))

### FIXED CODE ###

S = input()
print("x" * len(S))