Harryxun/stf_run huggingface dataset:
N, K = map(int, input().split())
A = list(input().split())

#for i in range(1,K+1):
#    B = B + A
#print(B)
# Tentousuu
cnt = 0
for i in range(0 , N*K):
    for j in range(i, N*K):
        if (A[(i%N)] > A[(j%N)]):
            cnt = cnt + 1
#print('t=' + str(cnt))
print(cnt%(10**9+7))


### FIXED CODE ###

M, D = map(int, input().split())

cnt = 0
for m in range(1, M+1):
    for d in range(20, D+1):
        d1 = d % 10
        d10 = d // 10
        if (d1 < 2):
            continue
        if (d1 * d10 == m):
#            print(str(m)+'/'+str(d))
            cnt = cnt + 1

print(cnt)
X,Y=map(int,input().spilt())
mult1=1
mult2=1
if (2*Y-X)%3 ==0:
    x=(2*Y-X)//3
    y=(2*X-Y)//3
    for i in range(min(x,y)):
        mult1*=(x+y-i)
        mult2*=min(x,y)-i
    print((mult2//mult1)%(10**9+7))
else:
    print(0)

### FIXED CODE ###

X,Y=map(int,input().split())
A,B=1,1
mod=10**9+7
if (X+Y)%3 ==0:
    x=(2*Y-X)//3
    y=(2*X-Y)//3
    if min(x,y) >= 0:
      for i in range(min(x,y)):
        A*=(x+y-i)
        A%=mod
        B*=(i+1)
        B%=mod
      print(A*pow(B,mod-2,mod)%mod)
    else:
      print(0)
else:
  print(0)
if A>=B and A-1>=B:
  print(A+A-1)
 	elif A>=B and A-1<B:
      print(A+B)
  	elif A<B and A<B-1:
      print(B+B-1)
    else:
      print(A+B)

### FIXED CODE ###

ipt=input()
lst=ipt.split()
A=int(lst[0])
B=int(lst[1])
if A>=B and A-1>=B:
    print(A+A-1)
elif A>=B and A-1<B:
    print(A+B)
elif A<B and A<B-1:
    print(B+B-1)
else:
    print(A+B)
n = int(input())
ans = ""
while n > 0:
    re = n % 26
    if re != 0:
        ans = chr(ord('a') + (re - 1)) + ans
        n = n // 26
    else:
        ans = 'z' + ans;
        n = n / 26 - 1
print(ans)

### FIXED CODE ###

n = int(input())
ans = ""
while n > 0:
    re = n % 26
    if re != 0:
        ans = chr(ord('a') + (re - 1)) + ans
        n = n // 26
    else:
        ans = 'z' + ans;
        n = n // 26 - 1
print(ans)
import sys

N, Y = list(map(int, input().split()))
for i_yukichi in range(N + 1):
    for j_higuchi in range(N + 1 - i_yukichi):
        k_noguchi = N - i_yukichi - j_higuchi
        if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
            print(i_yukichi, j_higuchi, k_noguchi)
            sys.exit

print("-1 -1 -1")


### FIXED CODE ###

S = input()
for i in range(len(S)):
    if i == 3:
        print("8", end="")
    else:
        print(S[i], end="")
def libra(l,r):
    if l>r:
        return "Left"
    elif l == r:
        return "Balanced"
    else:
        return "Right"
def sum(a,b):
    c = a+b
    return c

a,b,c,d=[int() for  in input().split()]
print(libra(sum(a,b),sum(c,d)))

### FIXED CODE ###

def libra(l,r):
    if l>r:
        return "Left"
    elif l == r:
        return "Balanced"
    else:
        return "Right"
def sum(a,b):
    c = a+b
    return c
a,b,c,d=[int(i) for i in input().split()]
print(libra(sum(a,b),sum(c,d)))
import sys
import io
import re
import math
#start = time.clock()
i = [0]*127
#n = raw_input()
for x in sys.stdin.read().lower:
    i[ord(x)]+=1
for y in range(ord('a'), ord('z')+1):
    print chr(y)+ ' : ' +i[y]

### FIXED CODE ###

import time
import sys
import io
import re
import math
#start = time.clock()
i = [0]*127
#n = raw_input()
for x in sys.stdin.read().lower():
    i[ord(x)]+=1
for y in range(ord('a'), ord('z')+1):
    print chr(y)+ ' : ' + str(i[y])
I = lambda: map(int, input().split())
nums = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
minf = -float('inf')
n, _ = I()
*A, = sorted(I(), reverse = True)
digs = [0]*(n+1)
for i in range(1, n+1):
    d = []
    for a in A :
        before = i-nums[a]
        d.append(minf if before < 0 else digs[before]+1)
    digs[i] = max(d)
ans = []
while n > 0:
    for a in A:
        if digs[n-nums[a]] == (digs[n]-1):
            ans.append(a)
            n -= nums[a]
            break
print(*ans, sep = '')

### FIXED CODE ###

a, b = map(int, input().split())
print((-1)**(b%a != 0)*a+b)
N = int(input())
i = int(input())
print(int(N+1-i))


### FIXED CODE ###

n,i = map(int,input().split(" "))
print(n+1-i)
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
diff_dist = B - A
diff_v = V - W
flag = False
if diff_dist == 0:
    flag = True
else:
    if diff_dist > 0:
        if diff_v > 0:
            t = diff_dist / diff_v
            if t <= T:
                flag = True
        else:
            flag = False
    else:
        if diff_v < 0:
            t = diff_dist / diff_v
            if t <= T:
                flag = True
        else:
            flag = Flase
if flag:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
diff_dist = B - A
diff_v = V - W
flag = False
if diff_v == 0:
    if diff_dist == 0:
        flag = True
elif diff_dist == 0:
    flag = True
else:
    if diff_v > 0:
        t = abs(diff_dist) / diff_v
        if t <= T:
            flag = True
if flag:
    print('YES')
else:
    print('NO')
s=input()
S=[]
for i in range(s):
    S.append(s[i])
d=[]
for i in range(len(S)-2):
    N=100*int(S[i])+10*int(S[i+1])+int(s[i+2])
    d.append(abs(N-753))
print(min(d))

### FIXED CODE ###

S=input()
d=[]
for i in range(len(S)-2):
    N=int(S[i:i+3])
    d.append(abs(N-753))
print(min(d))
N = int(input())
A = int(input())
B = int(input())

if N ==1:
    print("Hello world")
else:
    print(A+B)

### FIXED CODE ###

N = int(input())


if N ==1:
    print("Hello World")
else:
    A = int(input())
    B = int(input())
    print(A+B)
A,B,C,K = input().split()
a = int(A)
b = int(B)
k = int(K)

B_number = 0
C_number = 0

A_number = min(a,k)
k1 = k - a
if k1 > 0:
    B_number = min(b,k1)
    k2 = k1 - b
    if k2 > 0:
    C_number = min(c,k2)

print(A_number-C_number)

### FIXED CODE ###

A,B,C,K = input().split()
a = int(A)
b = int(B)
c = int(C)
k = int(K)

B_number = 0
C_number = 0

A_number = min(a,k)
k1 = k - a
if k1 > 0:
    B_number = min(b,k1)
    k2 = k1 - b
    if k2 > 0:
        C_number = min(c,k2)

print(A_number-C_number)
import itertools

N, M = map(int, input().split())
G = [[]  for _ in range(N)]
for i in range(M):
    a, b = map(lambda x: int(x) - 1, input().split())
    G[a].append(b)
    G[b].append(a)
pattern = [i for i in range(N)]

ans = 0
for i in itertools.permutations(pattern):
    flag = True
    now = i[j]
    to = i[j+1]
    if i[0] != 0:
        continue
    for j in range(len(i) - 1):
        if not to in G[now]:
            flag = False
    if flag:
        ans += 1
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
G = [[] for _ in range(N)]
seen = [False] * N
for i in range(M):
    a, b = map(lambda x: int(x) - 1 ,input().split())
    G[a].append(b)
    G[b].append(a)

def dfs(x, G, seen):
    seen[x] = True
    flag = True
    for i in seen:
        if i == False:
            flag = False
    if flag:
        return 1
    res = 0
    for i in G[x]:
        if seen[i]:
            continue
        res += dfs(i, G, seen)
        seen[i] = False
    return res

print(dfs(0, G, seen))
N, T = map(int, input().split(' '))
t = list(map(int, input().split(' ')))
t_interval = [t[i+1]-t[i] for i in range(N-1)]
ans = 0
for i in range(N-1):
    if t_interval[i] <= T:
        ans += t_interval[i]
    elif t_interval[i] > T:
        ans += T
ans += T
print(ans)


### FIXED CODE ###

N, K = map(int, input().split(' '))
D = input().split(' ')
for i in range(N, 10*N+1):
    flag = True
    ans = str(i)
    for n in ans:
        if n in D:
            flag = False
    if flag:
        print(ans)
        exit()
n, k = [int(i) for i in input().split()]
s = list(input())
s[k] = s[k].lower()
print("".join(s))

### FIXED CODE ###

n, k = list(map(int, input().split()))
k = k - 1
s = input()

s = s[:k] + s[k].lower() + s[k+1:]

print(s)
from collections import deque
import numpy as np
 
 
H,W= [int(x) for x in input().split()]
n=[]
T=np.zeros((H,W),dtype=int)
T=[]
S=np.zeros_like(T,dtype=int) 
for i in range(H):
  T[i]=[x for x in input().split()]
#B=T.copy()    
d=0
c=deque()  
for i in range(H):
    for j in range(W):
         
        if T[i][j] =="#":continue
 
          
        c.append((i,j))
        S[i][j] = 1
        #c.append(j)
        
        #t=len(c)
        while True:

                try:
                  m,n = c.popleft()
                except IndexError: break
                
                
                for kk in [(m+1,n),(m-1,n),(m,n+1),(m,n-1)]:
                  if not (0<=kk[0]<H and 0<= kk[1] <W): continue
                  if T[kk]=="#":continue
                  if S[kk] == 0:
                    c.append(kk)
                    S[kk] = S[m][n]+1        
                        
 
        #print(T)
        d = max(d,np.max(S))
        S=np.zeros_like(T,dtype=int)
        
print(d-1)


### FIXED CODE ###

from collections import deque
import numpy as np
 
 
H,W= [int(x) for x in input().split()]
n=[]
T=np.zeros((H,W),dtype=int)
#T=[]
S=np.zeros_like(T,dtype=int) 
for i in range(H):
  n=input()
  for j in range(W):
    if n[j]=="#": T[i][j]=1
#B=T.copy()    
d=0
c=deque()  
for i in range(H):
    for j in range(W):
         
        if T[i][j] ==1:continue
 
          
        c.append((i,j))
        S[i][j] = 1
        #c.append(j)
        
        #t=len(c)
        while True:

                try:
                  m,n = c.popleft()
                except IndexError: break
                
                
                for kk in [(m+1,n),(m-1,n),(m,n+1),(m,n-1)]:
                  if not (0<=kk[0]<H and 0<= kk[1] <W): continue
                  if T[kk]==1:continue
                  if S[kk] == 0:
                    c.append(kk)
                    S[kk] = S[m][n]+1        
                        
 
        #print(T)
        d = max(d,np.max(S))
        S=np.zeros_like(T,dtype=int)
        
print(d-1)
n,m = map(int, input().split())
py = []
for i in rante(m):
  a,b = map(int, input.split())
  py.append([a,b,i])
py.sort()
p = 1
y = 1
for i in range(m):
  if py[i][0] == p:
    py[i][1] = y
    y += 1
  else:
    py[i][1] = 1
    y = 1
    p = py[i][0]
py = sorted(py, key=lambda x:x[2])
for p,y,i in py:
  print("{06}{06}".format(p,y))



### FIXED CODE ###

n,m = map(int, input().split())
py = []
for i in range(m):
  a,b = map(int, input().split())
  py.append([a,b,i])
py.sort()
p = py[0][0]
y = 1
for i in range(m):
  if py[i][0] == p:
    py[i][1] = y
    y += 1
  else:
    py[i][1] = 1
    y = 2
    p = py[i][0]
py = sorted(py, key=lambda x:x[2])
for p,y,i in py:
  print("{:0=6}{:0=6}".format(p,y))
from numba import jit

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

dp = np.zeros(N+1, dtype=np.int64)
mv = np.zeros(N+1, dtype=np.int64)
for i in range(K):
    l, r = list(map(int, input().split()))
    for j in range(l, r+1):
        mv[j] = 1

@jit(nopython=True)
def shift_and_add(dp, mv, m, i):
    dp += np.concatenate((np.zeros(i+1, dtype=np.int64), mv[1:N-i+1]*m))
    dp %= MOD
        
dp[1] = 1
for i in range(1, N+1):
    m = dp[i]
    shift_and_add(dp, mv, m, i)

print(dp[N])


### FIXED CODE ###

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

a = [0] * (N+1)
f = [0] * (N+1)
mv = list()
for i in range(K):
    mv.append(list(map(int, input().split())))

def solve(N, a, f):
    for i in range(1, N+1):
        f[i] = (f[i-1] + a[i]) % MOD
        for j in range(len(mv)):
            l, r = mv[j]
            if i+l < N+1: a[i+l] = (a[i+l] + f[i]) % MOD
            if i+r+1 < N+1: a[i+r+1] = (a[i+r+1] - f[i]) % MOD

a[1] = 1
mv.sort()
solve(N, a, f)

print(a[N])
import sys

class Node():
    __slots__ = ['key', 'left', 'right']
    def __init__(self, key):
        self.key = key
        self.left, self.right = None

root = None
def insert(z):
    global root
    x, y = root, None
    while x:
        y = x
        if z < x.key:
            x = x.left
        else:
            x = x.right
    
    if y == -1:
        root = Node(z)
    elif z < y.key:
        y.left = Node(z)
    else:
        y.right = Node(z)
        
def preorder(x):
    return f" {x.key}" + preorder(x.left) + preorder(x.right) if x else ""

def inorder(x):
    return inorder(x.left) + f" {x.key}" + inorder(x.right) if x else ""
        
input()
node = {}
root = -1
for s in sys.stdin:
    if s[0] == "p":
        print(inorder(root))
        print(preorder(root))
    else:
        insert(int(s[7:])



### FIXED CODE ###

import sys

class Node():
    __slots__ = ['key', 'left', 'right']
    def __init__(self, key):
        self.key = key
        self.left, self.right = None, None
        
    def __str__(self):
        return self.key

root = None
def insert(z):
    global root
    x, y = root, None
    while x:
        y = x
        if z < x.key:
            x = x.left
        else:
            x = x.right
    
    if y == None:
        root = Node(z)
    elif z < y.key:
        y.left = Node(z)
    else:
        y.right = Node(z)
        
def preorder(x):
    return f" {x.key}" + preorder(x.left) + preorder(x.right) if x else ""

def inorder(x):
    return inorder(x.left) + f" {x.key}" + inorder(x.right) if x else ""
        
input()
node = {}
for s in sys.stdin:
    if s[0] == "p":
        pass
        print(inorder(root))
        print(preorder(root))
    else:
        insert(int(s[7:]))
a, b, c, d == input()
if a == b == c or b == c == d:
  print("Yes")
else :
  print("No")  

### FIXED CODE ###

a, b, c, d = input()
if a == b == c or b == c == d:
  print("Yes")
else :
  print("No")
def args():
    N, M = map(int, input().split())

    ST = []
    for _ in range(N):
        ST.append(tuple(map(int, input().split())))

    CP = []
    for _ in range(M):
        CP.append(tuple(map(int, input().split())))

    # print(N, M)
    # print(ST)
    # print(CP)

    return N, M, ST, CP


def solve(N, M, ST, CP):
    def get_dist(xy1, xy2):
        x1, y1 = xy1
        x2, y2 = xy2

        return abs(x1 - x2) + abs(y1 - y2)

    res = []
    for st in ST:
        min_cp, min_dist = None, 1000
        for i, cp in enumerate(CP):
            dist = get_dist(st, cp)
            if dist < min_dist:
                min_dist = dist
                min_cp = i
        res.append(min_cp + 1)

    return res


if __name__ == '__main__':
    ans = solve(*args())
    for a in ans:
        print(a)


### FIXED CODE ###

def args():
    N, M = map(int, input().split())

    ST = []
    for _ in range(N):
        ST.append(tuple(map(int, input().split())))

    CP = []
    for _ in range(M):
        CP.append(tuple(map(int, input().split())))

    # print(N, M)
    # print(ST)
    # print(CP)

    return N, M, ST, CP


def solve(N, M, ST, CP):
    def get_dist(xy1, xy2):
        x1, y1 = xy1
        x2, y2 = xy2

        return abs(x1 - x2) + abs(y1 - y2)

    res = []
    for st in ST:
        min_cp, min_dist = 0, float("inf")
        for i, cp in enumerate(CP):
            dist = get_dist(st, cp)
            if dist < min_dist:
                min_dist = dist
                min_cp = i
        res.append(min_cp + 1)

    return res


if __name__ == '__main__':
    ans = solve(*args())
    for a in ans:
        print(a)
s=list(input.split(","))
print(*s)

### FIXED CODE ###

s=input().split(",")
print(*s)
import heapq
from sys import stdin

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

sushi = {}

for i in range(N):
    t,d = map(int, stdin.readline().split())
    if t in sushi.keys():
        sushi[t].append(d)
    else:
        sushi[t] = [d]

P = []
Q = []

for x in sushi.keys():
    sushi[x].sort(reverse = True)
    P.append(sushi[x][0])
    
    for i in range(1,len(sushi[x])):
        Q.append(sushi[x][i])

heapq.heapify(P)

Q = list(map(lambda x:-x,Q))
heapq.heapify(Q)

while len(P) > K:
    m = heapq.heappop(P)
    heapq.heappush(Q,-m)

cur = 0

if K >= len(sushi.keys()):
    max_variation = K
else:
    max_variation = len(sushi.keys())
    for _ in range(K-max_variation):
        cur += heapq.heappop(Q)

cur += sum(P)
ans = cur + max_variation**2

for i in range(max_variation-1):
    p = heapq.heappop(P)
    cur -= p
    q = -heapq.heappushpop(Q,-p)
    cur += q
    ans = max(ans,cur+(max_variation-i-1)**2)

print(ans)

### FIXED CODE ###

import heapq
from sys import stdin

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

sushi = {}

for i in range(N):
    t,d = map(int, stdin.readline().split())
    if t in sushi.keys():
        sushi[t].append(d)
    else:
        sushi[t] = [d]

P = []
Q = []

for x in sushi.keys():
    sushi[x].sort(reverse = True)
    P.append(sushi[x][0])
    
    for i in range(1,len(sushi[x])):
        Q.append(sushi[x][i])

heapq.heapify(P)

Q = list(map(lambda x:-x,Q))
heapq.heapify(Q)

while len(P) > K:
    m = heapq.heappop(P)
    heapq.heappush(Q,-m)

cur = 0

if K <= len(sushi.keys()):
    max_variation = K
else:
    max_variation = len(sushi.keys())
    for _ in range(K-max_variation):
        cur -= heapq.heappop(Q)

cur += sum(P)
ans = cur + max_variation**2

for i in range(max_variation-1):
    p = heapq.heappop(P)
    cur -= p
    q = -heapq.heappushpop(Q,-p)
    cur += q
    ans = max(ans,cur+(max_variation-i-1)**2)

print(ans)
import math
n = int(input())
ai = [int(i) for i in input().split()]

ai.sort()

sqr_max_val = int(ai[n-1]**0.5)
max_val = ai[n-1]
#print(ai)
ai_ex = [0]*(2*10**5+1)
#ai_ex = [0]*(30)

for i in range(n):
    ai_ex[ai[i]-1] += 1

for i in range(n):
    if ai_ex[ai[i]-1] > 1:
        ai_ex[ai[i]-1] = 0
    """
    if ai[i] > sqr_max_val:
        break
    """
    tmp = ai[i]
    baisu = 2
    #print(ai[i])
    while tmp * baisu <=  max_val:
        ai_ex[tmp*baisu-1] = 0
        #print(tmp*baisu)
        baisu += 1

for i in range(100):
    if ai_ex[i] == 1:
        a = 1
        #print(i)

print(sum(ai_ex))
#print(ai_ex)

### FIXED CODE ###

import math
n = int(input())
ai = [int(i) for i in input().split()]

ai.sort()

sqr_max_val = int(ai[n-1]**0.5)
max_val = ai[n-1]
#print(ai)
ai_ex = [0]*(2*10**6)
#ai_ex = [0]*(30)

for i in range(n):
    ai_ex[ai[i]-1] += 1

for i in range(n):
    if ai_ex[ai[i]-1] > 1:
        ai_ex[ai[i]-1] = 0
    """
    if ai[i] > sqr_max_val:
        break
    """
    tmp = ai[i]
    baisu = 2
    #print(ai[i])
    while tmp * baisu <=  max_val:
        ai_ex[tmp*baisu-1] = 0
        #print(tmp*baisu)
        baisu += 1
"""
for i in range(100):
    if ai_ex[i] == 1:
        a = 1
        #print(i)
"""
print(sum(ai_ex))
#print(ai_ex)
import math 
from functools import reduce
#C問題
#最小公倍数
N=int(input())
T=[]
for i in range(0,N):
    T.append(int(input()))
def lcm_base(x,y):
    return (x*y)//math.gcd(x,y)
print(reduce(lcm_base,T))

### FIXED CODE ###

#ユークリッドの互除法を用いる
N=int(input())
T=[]
for i in range(0,N):
    T.append(int(input()))
def gcd(a,b):
    while b>0 :
        a0=a
        b0=b
        a=b0
        b=a0%b0
    return a
def lcm_base(x,y):
    return (x*y)//gcd(x,y)
def lcm_reduce(T):
    result=T[0]
    for i in range(1,len(T)):
        result=lcm_base(result,T[i])
    return result
print(lcm_reduce(T))
def LI:
	return [int(s) for s in input().split()]
  

D1 = LI()
D2 = LI()

if print(0) if D2[0] != D1[0] else print(1)

### FIXED CODE ###

def LI():
	return [int(s) for s in input().split()]

D1 = LI()
D2 = LI()
 
print(1) if D2[1] == 1 else print(0)
n=int(input())
def gcd(a,b):
  if b==0:
    return a
  else:
    return gcd(b,a%b)
ans=0
for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      t=gcd(i,gcd(j,k))
      ans+=t
print(ans)

### FIXED CODE ###

K=int(input())
def gcd(a,b):
    res=0
    while b!=0:
        res=a%b
        a=b
        b=res
    return a

ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            t=gcd(i,gcd(j,k))
            ans+=t
print(ans)
import sys
import math
w, h, x, y = map(int, sys.stdin.readline().split())

d = [None for i in range(4)]
d[0] = abs(x*1+y*(-1)+w*h)/math.sqrt(1**2 + (-1)**2)
d[1] = abs(x*(-h/w)+y*(-1)+h)/math.sqrt((-h/w)**2 + (-1)**2)
d[2] = abs(x-w*0.5)
d[3] = abs(y-h*0.5)

if int(w-2*x)==0 and int(h-2*y)==0:
  print(w*h/2.0, 1)
  exit()
elif int(w-2*x)==0 or int(h-2*y)==0:
  print(w*h/2.0, 0)
  exit()

if int(d1) == 0 or int(d2) == 0:
  if int(w-2*x)==0 and int(h-2*y)==0:
    print(w*h/2.0, 1)
  else:
    print(w*h/2.0, 0)
elif d.index().min(d) == 0:
  if x > 0.5*w:
    if y < h/w*x:
      print((x*w*w)/y*0.5, 0)
    else:
      print((x*h*h)/y*0.5, 0)
  else:
    b = h - (h-y)/(w-x)*w
    if y < h/w*x:
      print(h*(w-b*(w-x)/(h-y))*0.5, 0)
    else:
      print(w*(h-b)*0.5, 0)
elif d.index().min(d) == 1:
  if int(d[0]-d[1]) == 0:
    casenum = 1
  else:
    casenum = 0
    
  if x > 0.5*w:
    if  y > -h/w*x+h:
      print(w*(-(y-h)*w/x)*0.5, casenum)
    else:
      print(h*x*h/(h-y)*0.5, casenum)
  else:
    b = (h + y*w/(x-w)) * (x-w)/y
    if  y > -h/w*x+h:
      print(h*(w-(b-h)*x/(y-h))*0.5, casenum)
    else:
      print(w*(h-b)*0.5, casenum)
elif d.index().min(d) == 2:
  print(1,1)
  exit()
  if y > 0.5*h:
    b = w*y/(w-2*x)
    x1=(x-0.5*w)/y*(b-h)
    if x > 0.5*w:
      print(h*(0.5*w+w-x1)*0.5, 0)
    else:
      print(h*(0.5*w+0.5*w-x1)*0.5, 0)
  else:
    b = h - 0.5*w*y/(x-0.5*w)
    x1=b*y/(0.5*w-x)
    if x > 0.5*w:
      print(0.5*h(0.5*w+w-x1), 0)
    else:
      print(0.5*h(0.5*w+0.5*w-x1), 0)    
elif d.index().min(d) == 3:
  if int(d[2]-d[3]) == 0:
    casenum = 1
  else:
    casenum = 0
  if x > 0.5*w:
    if y > 0.5*h:
      print(0.5*w*(0.5*h+h-(y-0.5*h)/x*w+0.5*h), casenum)
    else:
      print(0.5*w*(0.5*h+0.5*h-(y-0.5*h)/x*w+0.5*h), casenum)
  else:
    if y > 0.5*h:
      print(0.5*w*(0.5*h+h-(0.5*h-w*(y-0.5*h)/(x-w))), casenum)
    else:
      print(0.5*w*(0.5*h+0.5*h-(0.5*h-w*(y-0.5*h)/(x-w))), casenum)    

### FIXED CODE ###

import sys
import math
w, h, x, y = map(int, sys.stdin.readline().split())
S = w*h/2

if x == w/2 and y == h/2:
  print(S,1)
else:
  print(S, 0)
N,K=map(int,input().split())
h=list(input())
s=0
for i in range(N):
  if h[i]>=K:
    s+=1
print(s)    

### FIXED CODE ###

N,K=map(int,input().split())
h=list(map(int,input().split()))
s=0
for i in range(N):
    if h[i]>=K:
        s+=1
print(s)
import copy
import math

def calc(x, aa):
    a = copy.deepcopy(aa)
    cnt = k
    while cnt > 0:
        for i in range(n):
            if (a[i] > x):
                cnt -= a[i] // x
                a[i] = x
            if cnt < 0:
                return False
        if cnt < 0:
            return False
        return True


n, k = map(int, input().split())
a = [int(i) for i in input().split()]
left, right = 0, max(a)
while (right - left) > 1:
    middle = (left + right) / 2
    if calc(middle, a):
        right = middle
    else:
        left = middle
print(math.ceil(middle))



### FIXED CODE ###

import copy
import math

def calc(x, aa):
    a = copy.deepcopy(aa)
    cnt = k
    while cnt > 0:
        for i in range(n):
            if (a[i] > x):
                cnt -= a[i] // x
                a[i] = x
            if cnt < 0:
                return False
        if cnt < 0:
            return False
        return True
    
n, k = map(int, input().split())
a = [int(i) for i in input().split()]
left, right = 0, max(a)
if k == 0:
    print(right)
    exit()
    
while (right - left) > 1:
    middle = (left + right) / 2
    if calc(middle, a):
        right = middle
    else:
        left = middle        
for i in range(max(math.floor(left) - 10, 1), math.ceil(right) + 10):
    if calc(i, a):
        print(i)
        exit()