Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

W, H, x, y = map(int, input().split())

count = 0
s = 0
if 2 * x == W and 2 * y == H:
    s = W * H / 2
    count = 4
else:

    if (x == 0 and y == 0) or (x == 0 and y == H) or (x == W and y == 0) or (x == W and y == H):
        s = W * H / 2
        count = 1
    elif (x == 0 and 2 * y == H) or (x == W and 2 * y == H) or (2 * x == W and y == 0) or (2 * x == W and y == H)
        s = W * H / 2
        count = 1
    else:        
        if 2 * x == W:
            s = W * H / 2
            count = 1

        elif 2 * y == H:
            s = W * H / 2
            count = 1
        else:
            a = (H - 2 * y) / (2 * x - W)
            if a > 0:
                if ((H + a * x - y) / a) <= W and ((a * x - y) / a) >= 0:
                    s = (H**2 / 2 + H * (a * x - y)) / a
                    count += 2
            elif a < 0:
                s = a * (W**2) / 2 + (y - a * x) * W
                a *= -1
                if (a * W + y - a * x) <= H and (y - a * x) >= 0:
                    count += 2
if count == 1:
    print("{0:.6f}".format(s),0)
else:
    print("{0:.6f}".format(s),1)


### FIXED CODE ###

# -*- coding: utf-8 -*-

W, H, x, y = map(int, input().split())

count = 0
s = 0
if 2 * x == W and 2 * y == H:
    s = W * H / 2
    count = 4
else:

    if (x == 0 and y == 0) or (x == 0 and y == H) or (x == W and y == 0) or (x == W and y == H):
        s = W * H / 2
        count = 1
    elif (x == 0 and 2 * y == H) or (x == W and 2 * y == H) or (2 * x == W and y == 0) or (2 * x == W and y == H):
        s = W * H / 2
        count = 1
    else:
        if 2 * x == W:
            s = W * H / 2
            count = 1

        elif 2 * y == H:
            s = W * H / 2
            count = 1
        else:
            a = (H - 2 * y) / (2 * x - W)
            if a > 0:
                if ((H + a * x - y) / a) <= W and ((a * x - y) / a) >= 0:
                    s = (H**2 / 2 + H * (a * x - y)) / a
                    count += 1

                a *= -1
                if ((H + a * x - y) / a) >= 0 and ((a * x - y) / a) <= W:
                    s = (H**2 / 2 + H * (a * x - y)) / a
                    count += 1


            elif a < 0:
                s = a * (W**2) / 2 + (y - a * x) * W
                if (a * W + y - a * x) >= 0 and (y - a * x) <= H:
                    count += 1
                a *= -1
                if (a * W + y - a * x) <= H and (y - a * x) >= 0:
                    count += 1



if count == 1:
    print("{0:.6f}".format(abs(s)),0)
else:
    print("{0:.6f}".format(abs(s)),1)
import sys
input = sys.stdin.readline
from collections import deque
def bfs(now):
    plan = deque()
    plan.append(now)
    while plan:
        now = plan.popleft()
        for bady, l in LINK[now]:
            if COLOR[bady] != -1:
                continue
            plan.append(bady)
            if l%2:
                COLOR[bady] = 1
            else:
                COLOR[bady] = 0

if __name__ == '__main__':
    N = int(input())
    LINK = [deque()*(N+1) for i in range(N+1)]
    for i in range(N-1):
        a, b, l = map(int, input().split())
        LINK[a].append([b, l])
        LINK[b].append([a, l])
    # print(LINK)
    # print(LINK[1])
    # print(LINK[1][0])
    COLOR= [-1]*(N+1)
    bfs(1)
    for i in range(1,N+1):
        print(COLOR[i])

### FIXED CODE ###

import sys
input = sys.stdin.readline
from collections import deque
def bfs(now):
    plan = deque()
    plan.append(now)
    while plan:
        now = plan.popleft()
        color = COLOR[now]
        for bady, l in LINK[now]:
            if COLOR[bady] != -1:
                continue
            plan.append(bady)
            if l%2:
                COLOR[bady] = 1 - color
            else:
                COLOR[bady] = color

if __name__ == '__main__':
    N = int(input())
    LINK = [[]*(N+1) for i in range(N+1)]
    # LINK = [deque()*(N+1) for i in range(N+1)]
    for i in range(N-1):
        a, b, l = map(int, input().split())
        LINK[a].append([b, l])
        LINK[b].append([a, l])
    # print(LINK)
    # print(LINK[1])
    # print(LINK[1][0])
    COLOR= [-1]*(N+1)
    COLOR[1] = 1
    bfs(1)
    for i in range(1,N+1):
        print(COLOR[i])
N,M = map(int,input().split())
A = np.zeros(M,dtype=int)
B = np.zeros(M,dtype=int)
for i in range(M):
    A[i],B[i] = map(lambda x:int(x)-1,input().split())


def check_connect(A,B):
    a = cnt[A]
    b = cnt[B]
    if a==-1 and b==-1:
        connect.append([A,B])
        cnt[A] = len(connect)-1
        cnt[B] = cnt[A]
        return 1
    if a == b:
        return 0
    if a==-1 or b==-1:
        if a==-1:
            a = b
            A,B = B,A
        connect[a] += [B]
        cnt[B] = a
        return len(connect[a])-1
        
    tmp1 = len(connect[a])
    tmp2 = len(connect[b])
    if tmp2 > tmp1:
        a,b = b,a
    connect[a] = connect[a] + connect[b]
    for i in connect[b]:
        cnt[i] = a
    tmp3 = tmp1+tmp2
    connect[b] = []
    return (tmp3*(tmp3-1)-tmp1*(tmp1-1)-tmp2*(tmp2-1))//2

connect = []
cnt = [-1]*N
dfubensa = [0]*M
for i in range(M-1,-1,-1):
    dfubensa[i] = check_connect(A[i],B[i])

fubensa = dfubensa[0]
print(fubensa)
for i in range(1,M):
    fubensa = fubensa+ dfubensa[i]
    print(fubensa)


### FIXED CODE ###

N,M = map(int,input().split())
A = [0]*M
B = [0]*M
for i in range(M):
    A[i],B[i] = map(lambda x:int(x)-1,input().split())

def check_connect(A,B):
    a = cnt[A]
    b = cnt[B]
    if a==-1 and b==-1:
        connect.append([A,B])
        cnt[A] = len(connect)-1
        cnt[B] = cnt[A]
        return 1
    if a == b:
        return 0
    if a == -1:
        a,b,A,B = b,a,B,A
    if b==-1:
        connect[a] += [B]
        cnt[B] = a
        return len(connect[a])-1
        
    tmp1 = len(connect[a])
    tmp2 = len(connect[b])
    if tmp2 > tmp1:
        a,b = b,a
    connect[a] += connect[b]
    for i in connect[b]:
        cnt[i] = a
    tmp3 = tmp1+tmp2
    connect[b] = []
    return (tmp3*(tmp3-1)-tmp1*(tmp1-1)-tmp2*(tmp2-1))//2

connect = []
cnt = [-1]*N
dfubensa = [0]*M
for i in range(M-1,-1,-1):
    dfubensa[i] = check_connect(A[i],B[i])

fubensa = dfubensa[0]
print(fubensa)
for i in range(1,M):
    fubensa += dfubensa[i]
    print(fubensa)
s=list(input())

if int(s[0])* int(s[1]) > int(s[2]):
    print(s[2])
else:
    print(int(s[0])* int(s[1]))

### FIXED CODE ###

li = list(map(int,input().split()))
 
if li[0]*li[1] > li[2]:
    print(li[2])
else:
    print(li[0]*li[1])
from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
#from math import *
from collections import defaultdict as dd, deque
def data(): return sys.stdin.readline().strip()
def mdata(): return map(int, data().split())
out=sys.stdout.write
#sys.setrecursionlimit(100000)
INF=int(10e9)


s=input()
t=input()
dp1=[0]*len(s)
for i in range(len(t)):
    m=0
    dp2=dp1.copy()
    for j in range(len(s)):
        if s[j]==t[i]:
            dp2[j]=max(m+1,dp1[j])
        m=max(m,dp1[j])
    dp1=dp2.copy()

dp3=[0]*len(s)
for i in range(len(t)-1,-1,-1):
    m=0
    dp2=dp3.copy()
    for j in range(len(s)-1,-1,-1):
        if s[j]==t[i]:
            dp2[j]=max(m+1,dp3[j])
        m=max(m,dp3[j])
    dp3=dp2.copy()

m=max(dp1)
cnt=max(dp1)
ans=''
for j in range(len(s)-1,-1,-1):
    if dp1[j]>=cnt and dp3[j]>=m-cnt+1:
        ans=s[j]+ans
        cnt-=1
    if cnt==0:
        break
print(ans)



### FIXED CODE ###

from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
#from math import *
from collections import defaultdict as dd, deque
def data(): return sys.stdin.buffer.readline().strip().decode()
def mdata(): return map(int, data().split())
out=sys.stdout.write
#sys.setrecursionlimit(100000)
INF=int(10e9)


s=data()
t=data()
dp=[[0]*(len(s)+1) for i in range(len(t)+1)]
for i in range(1,len(t)+1):
    for j in range(1,len(s)+1):
        if s[j-1]==t[i-1]:
            dp[i][j]=dp[i-1][j-1]+1
        else:
            dp[i][j]=max(dp[i-1][j],dp[i][j-1])
m=max(max(dp))
ans=''
for i in range(len(t)-1,-1,-1):
    for j in range(len(s)-1,-1,-1):
        if dp[i+1][j+1]==m and s[j]==t[i]:
            ans=s[j]+ans
            m-=1
            break
print(ans)
from decimal import Decimal
n = int(input())
a = []
r = [[0 for i in range(14)] for j in range(14)]
for i in range(n):
    d = Decimal(input())
    d *= 10**9
    d2 = 0
    d5 = 0
    while True:
        if d % 2 != 0 and d % 5 != 0:
            break
        if d % 2 == 0:
            d //= 2
            d2 += 1
        if d % 5 == 0:
            d //= 5
            d5 += 1
    a.append((d2,d5))
    r[d2][d5] += 1
ans = 0

for x , y in a:
    for i in range(14):
        for j in range(14):
            if min(i+x,j+y) >= 18:
                ans += r[i][j]
    if min(x,y) >= 9:
        ans -= 1
print(ans//2)

### FIXED CODE ###

from decimal import Decimal
n = int(input())
a = []
r = {}
for i in range(n):
    d = int(float(input())*10**9 + 0.1)
    d2 = 0
    d5 = 0
    while True:
        if d % 2 != 0 and d % 5 != 0:
            break
        if d % 2 == 0:
            d //= 2
            d2 += 1
        if d % 5 == 0:
            d //= 5
            d5 += 1
    a.append((d2,d5))
    r[(d2,d5)] = r.get((d2,d5),0) + 1
ans = 0
for x , y in r.keys():
    for i , j in r.keys():
        if min(x+i,y+j) >= 18:
            ans += r[(x,y)]*r[(i,j)]
            if x == i and y == j:
                ans -= r[(x,y)]
                
print(ans//2)
a = int(input)
b = int(input)
h = int(input)
print((a+b)*(h/2))

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())
print((a+b)*(h//2))
import bisect
from itertools import product

N, K = map(int, input().split())
D = map(int, input().split())
like_num = set(range(0,10)) ^ set(D)
length = len(str(N))
comb = [int("".join(map(str, a))) for a in product(like_num, repeat=length)]
ind = bisect.bisect_left(comb, N)
print(comb[ind])

### FIXED CODE ###

from itertools import product

N, K = map(int, input().split())
D = map(int, input().split())
like_num = set(range(10)) ^ set(D)
length = len(str(N))

for i in range(length, length+2):
  for x in product(like_num,repeat=i):
        d=''.join(map(str,x))
        if int(d)>=N:
          print(d)
          exit()
a,b = int(input()).split()
wa = a + b
sa = a - b
seki = a * b
list = [wa,sa,seki]
print(max(list))

### FIXED CODE ###

a,b = map(int,input().split())
wa = a + b
sa = a - b
seki = a * b
list = [wa,sa,seki]
print(max(list))
a,b = input().split()

a = int(a)

b1,b2 = map(int, b.split('.'))
b = b1*100 + b2

ans = (a*b)//100

print(int(ans))

### FIXED CODE ###

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

print(a*b)
T = input().split()
N = len(T)
for i in range(N):
  if T[i] =='?' and T[i+1]=='D':
    del T[i]   
    T.insert(i, P)
  elif T[i] =='?':
    del T[i] 
    T.insert(i, D)
print(T) 


### FIXED CODE ###

S = input()
s=[]
for i in S:
    s.append(i)
t = []
for i in range(len(s)):
  if s[i] == '?':
    t.append('D')
  else:
    t.append(s[i])
Strt = "".join(t)
print(Strt)
s = input()
K = int(input())

ans = ""
for i,value in enumerate(s):
    
    ask = ord(value)
    if K + ord(value) - ord("a") > 26:
        ans = ans + "a"
        K -= ord("z")  - ord(value) + 1
    else:
        ans = ans + s[i:]
        break
    
if K > 0:
    if ord(ans[-1]) + K > ord("z"):
        last = chr(ord(ans[-1]) + K -26)
        ans = ans[:-1] +last
    else:
        last = chr(ord(ans[-1]) + K )
        ans = ans[:-1] +last
        
print(ans)

### FIXED CODE ###

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

ans = []

for i in s:
    if i == "a":
        ans.append("a")
        continue
    
    if ord(i) + K >= ord("z") + 1:
        ans.append("a")
        K -= ord("z") + 1 - ord(i)
    
    else:
        ans.append(i)
        


last = (K + ord(ans[-1]) - ord('a')) % 26
ans[-1] = chr(ord("a") + last)
print(''.join(ans))
n,a,b = map(int,input().split())
ans = int(n / (a + b))
rem = n % (a + b)
if rem > a:
    print(ans * a + a)
else:
    print(ans * a + rem)

### FIXED CODE ###

s = input()
for i in range(0,2):
  if s[i] != s[i+1]:
    print('Yes')
    break
else:
  print('No')
s=input()
if len(set(input()))==2:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s=input()
if len(set(s))==2:
  print("Yes")
else:
  print("No")
n=int(input())
a = [map(int,input()) for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass

### FIXED CODE ###

n=int(input())
a = [int(input()) for _ in range(n)]
nex=[]
k=1
for i in range(len(a)):
    nex.append(a[k-1])
    k=nex[-1]
    if nex[-1]==2:
        print(len(nex))
        break
    elif len(nex)>=n:print(-1)
    else:pass
#!/usr/bin/env python3
import sys
import statistics
import collections

def solve(n: int, v: "List[int]"):
    half_length = len(v) // 2
    O = [v[i] for i in range(1, n, 2)]
    E = [v[i] for i in range(0, n, 2)]

    co = list(collections.Counter(O).most_common())
    ce = list(collections.Counter(E).most_common())
    o1 = co[0][0]
    e1 = ce[0][0]

    O_ = list(filter(lambda o: o != o1, O))
    E_ = list(filter(lambda e: e != e1, E))
    num_o_1 = len(O_) 
    num_e_1 = len(E_)
    num = 0
    if e1 != o1:
        num = num_o_1 + num_e_1
    else:
        if len(co) == 1 and len(ce) == 1:
            num = half_length
        elif len(co) == 1:
            e2 = ce[1][0]
            num_e_2 = len(list(filter(lambda e: e != e2, E)))
            num = num_o_1 + num_e_2
        elif len(ce) == 1:
            o2 = co[1][0]
            num_o_2 = len(list(filter(lambda o: o != o2, O)))
            num = num_o_2 + num_e_1
        else:
            e2 = ce[1][0]
            o2 = co[1][0]
            num = min(num_o_1 + num_e_2, num_o_2 + num_e_1)
    print(num)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    n = int(next(tokens))  # type: int
    v = [ int(next(tokens)) for _ in range(n) ]  # type: "List[int]"
    solve(n, v)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
import statistics
import collections

def solve(n: int, v: "List[int]"):
    half_length = len(v) // 2
    O = [v[i] for i in range(1, n, 2)]
    E = [v[i] for i in range(0, n, 2)]

    co = list(collections.Counter(O).most_common())
    ce = list(collections.Counter(E).most_common())
    o1 = co[0][0]
    e1 = ce[0][0]

    O_ = list(filter(lambda o: o != o1, O))
    E_ = list(filter(lambda e: e != e1, E))
    num_o_1 = len(O_) 
    num_e_1 = len(E_)

    num = 0
    if e1 != o1:
        num = num_o_1 + num_e_1
    else:
        if len(co) == 1 and len(ce) == 1:
            num = half_length
        elif len(co) == 1:
            e2 = ce[1][0]
            num_e_2 = len(list(filter(lambda e: e != e2, E)))
            num = num_o_1 + num_e_2
        elif len(ce) == 1:
            o2 = co[1][0]
            num_o_2 = len(list(filter(lambda o: o != o2, O)))
            num = num_o_2 + num_e_1
        else:
            e2 = ce[1][0]
            o2 = co[1][0]
            num_e_2 = len(list(filter(lambda e: e != e2, E)))
            num_o_2 = len(list(filter(lambda o: o != o2, O)))
            num = min(num_o_1 + num_e_2, num_o_2 + num_e_1)
    print(num)
    return

def len2(l):
    n = 0
    for i in l:
        n += 1
    return n

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    n = int(next(tokens))  # type: int
    v = [ int(next(tokens)) for _ in range(n) ]  # type: "List[int]"
    solve(n, v)

if __name__ == '__main__':
    main()
from sys import exit
import math

A, B, C, D = map(int, input().split())

CD = (C * D) // math.gcd(C, D)

c_sum = B // C - (A - 1) // C
d_sum = B // D - (A - 1) // D
cd_sum = B // CD - (A - 1) // CD

print(B - A + 1 - (c_sum + d_sum - cd_sum))


### FIXED CODE ###

from sys import exit
import fractions

A, B, C, D = map(int, input().split())

CD = (C * D) // fractions.gcd(C, D)

c_sum = B // C - (A - 1) // C
d_sum = B // D - (A - 1) // D
cd_sum = B // CD - (A - 1) // CD

print(B - A + 1 - (c_sum + d_sum - cd_sum))
a,b,c=int(input())

if a==b and b==c:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

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

if a==b and b==c:
  print('Yes')
else:
  print('No')
n,k,s = map(int,input().split())
x = [0]*n
for i in range(k):
    x[i] = s
if k != n:
    x[i+1] = 1 if s != 1 else 2

for i in range(n-1):
    print(x[i],end=" ")
else:
    print(x[i+1])


### FIXED CODE ###

n,k,s = map(int,input().split())
x = [0]*n
for i in range(n):
    if i < k:
        x[i] = s
    else:
        if s != 10**9:
            x[i] = s+1
        else:
            x[i] = 1

for i in range(n-1):
    print(x[i],end=" ")
else:
    print(x[n-1])
N,K=map(int,input().split())
import math
s=0
if N-K>=0:
  N-=(N-K+1)
for j in range(1,N+1):
  if (K/j)%2==0:
    s+=math.log2(K//j)
  else:
    s+=int(math.log2(K/j))+1
print(float(N/(s+N)))
    


### FIXED CODE ###

N,K=map(int,input().split())
i=0
q=0 #確率
for j in range(1,N+1):
  while j*(2**i)<K:
    i+=1
  q+=(1/N)*((1/2)**i)
  i=0
print(q)
matchNums=input()

flg=False
for i in range(len(matchNums)-1):
    if matchNums[i] == matchNums[i+1]:
        flg = True
if flg:
    print("Bad")
else
    print("Good")

### FIXED CODE ###

matchNums=input()

flg=False
for i in range(len(matchNums)-1):
    if matchNums[i] == matchNums[i+1]:
        flg = True
if flg:
    print("Bad")
else:
    print("Good")
n = int(input())

divisors = []
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        divisors.append(i)
        if i != n // i:
            divisors.append(n//i)

times = 10**12

for j in range(0, len(divisors), 2):
	time = (divisors[j] - 1) + (divisors[j+1] - 1)
	if time < times:
		times = time
print(times)


### FIXED CODE ###

n = int(input())

divisors = []
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        divisors.append(i)
        if i != n // i:
            divisors.append(n//i)

times = 10**12

for j in range(len(divisors)):
    x = divisors[j]
    y = n // x
    time = (x -1) + (y - 1)
    if time < times:
      times = time
print(times)
n = int(input())
m = int(-1 + (n-2) ** 0.5) + 1
for i in range(1,n+1):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      if (x+y)**2-4*(x**2+y**2+x*y-i) >0:
        z = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2       
        if z%1 == 0 and z>0:            
          cnt += 1
      else:
        break
  print(cnt)
 

### FIXED CODE ###

n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])
n,k=map(int,input().split())
a=[0]*n
a=list(map(int,input().split()))

List=[0]*n
pattern=[1]
now=0
nex=0
List[0]=1
end_flag=0

while end_flag==0:
    nex=a[now]
    if (List[nex-1]==1):
        target1=nex
        end_flag=1
        break
    else:
        List[nex-1]+=1
        pattern.append(nex)
        now=nex-1

left=pattern.index(target1)
right=len(pattern)
kaisu=right-left
kaisu2=(k-right)%kaisu

if (k<=right):
    print(pattern[k])
else:
    print(pattern[left+kaisu2])
    
    
##print("left",left,"right",right)
#print(pattern[target])
#print(kaisu,target)



### FIXED CODE ###

n,k=map(int,input().split())
a=[0]*n
a=list(map(int,input().split()))

List=[0]*n
pattern=[1]
now=0
nex=0
List[0]=1
end_flag=0

while end_flag==0:
    nex=a[now]
    if (List[nex-1]==1):
        target1=nex
        end_flag=1
        break
    else:
        List[nex-1]+=1
        pattern.append(nex)
        now=nex-1

left=pattern.index(target1)
right=len(pattern)
kaisu=right-left
kaisu2=(k-right)%kaisu


if (k<=right-1):
    print(pattern[k])
else:
    print(pattern[left+kaisu2])
n,k=map(int,input().split())
P=[int(i) for i in input().split()]
n_max=2*10**5
num=n_max.bit_length()+1
def init1(init_val):
  for i in range(n):
    seg1[i+num-1]=init_val[i]    
    for i in range(num-2,-1,-1) :
      seg1[i]=max(seg1[2*i+1],seg1[2*i+2]) 
def init2(init_val):
  for i in range(n):
    seg2[i+num-1]=init_val[i]    
    for i in range(num-2,-1,-1) :
      seg2[i]=min(seg2[2*i+1],seg2[2*i+2]) 
   
def query1(p,q):
  if q<=p:
    return ide_ele1
  p+=num-1
  q+=num-2
  res=ide_ele1
  while q-p>1:
    if p&1==0:
      res=max(res,seg1[p])
    if q&1==1:
      res=max(res,seg1[q])
      q-=1
    p=p//2
    q=(q-1)//2
  if p==q:
    res=max(res,seg1[p])
  else:
    res=max(max(res,seg1[p]),seg1[q])
  return res
def query2(p,q):
  if q<=p:
    return ide_ele2
  p+=num-1
  q+=num-2
  res=ide_ele2
  while q-p>1:
    if p&1==0:
      res=min(res,seg2[p])
    if q&1==1:
      res=min(res,seg2[q])
      q-=1
    p=p//2
    q=(q-1)//2
  if p==q:
    res=min(res,seg2[p])
  else:
    res=min(min(res,seg2[p]),seg2[q])
  return res
ide_ele1=0
ide_ele2=n_max
seg1=[ide_ele1]*2*num
seg2=[ide_ele2]*2*num
init1(P)
init2(P)
ans=1
for i in range(k,n):
  if P[i-k]==query2(i-k,k+1) and P[i]==query1(i-k,k+1):
    continue
  else:
    ans+=1

Q=[0]*n
for i in range(1,n):
  if P[i]>P[i-1]:
    Q[i]=Q[i-1]+1
  else:
    continue
count=0
for i in range(n):
  if Q[i]>=k-1:
    count+=1
print(ans-count+1)



### FIXED CODE ###

n,k=map(int,input().split())
P=[int(i) for i in input().split()]
import collections
from collections import deque
M1,M2=deque(),deque()
A1,A2=[],[]
M1.append(0)
for i in range(1,n):
  while M1:
    if P[M1[-1]]>P[i]:
      M1.pop()
    else:
      M1.append(i)
      break
  if not M1:
    M1.append(i)
  if M1[0]==i-k-1:
    M1.popleft()
  if i<k:
    continue
  else:
    A1.append(P[M1[0]])
M2.append(0)
for i in range(1,n):
  while M2:
    if P[M2[-1]]<P[i]:
      M2.pop()
    else:
      M2.append(i)
      break
  if not M2:
    M2.append(i)
  if M2[0]==i-k-1:
    M2.popleft()
  if i<k:
    continue
  else:
    A2.append(P[M2[0]])
ans=1
for i in range(n-k):
  if A1[i]==P[i] and A2[i]==P[i+k]:
    continue
  else:
    ans+=1
Q=[0]*n
for i in range(1,n):
  if P[i]>P[i-1]:
    Q[i]=Q[i-1]+1
  else:
    continue
count=0
for i in range(n):
  if Q[i]==k-1:
    count+=1
print(ans-max(0,count-1))
n = int(input())
arr = [ int(x) for x in input().strip().split(' ') ]
isZ = False
for x in arr:
    if x == 0:
        isZ = True

if isZ:
    print ("0")
    exit(0)

res = 1
for x in arr:
    res *= x
    if res > 1000000000000000000:
        print ("-1")
        exit(0)
p

### FIXED CODE ###

n = int(input())
arr = [ int(x) for x in input().strip().split(' ') ]
isZ = False
for x in arr:
    if x == 0:
        isZ = True

if isZ:
    print ("0")
    exit(0)

res = 1
for x in arr:
    res *= x
    if res > 1000000000000000000:
        print ("-1")
        exit(0)
print (res)
A, B, K = [int(x) for x in input().split()]
return max(0, A - k) + max(0, B - k)

### FIXED CODE ###

# B - Greedy Takahashi

A, B, K = [int(x) for x in input().split()]
AB = A + B
if A > K:
    print(A - K, B)
elif AB > K:
    print(0, AB - K)
else:
    print(0, 0)