Harryxun/stf_run huggingface dataset:
ls = input().strip().split()
return (ls.count('7') == 1) and (ls.count('5')==2)

### FIXED CODE ###

ls = input().strip().split()
print('YES' if (ls.count('7') == 1) and (ls.count('5')==2) else 'NO')
from sys import stdin
input = stdin.readline
def minus(n):
  return n-1
  
def main():
  num_list = list(map(int, input().split()))
  A = list(map(int, input().split()))
  N=num_list[0]
  K=num_list[1]
  A_i=0
  N_list=[0]*N
  A =list(map(minus, A))
  sFlag=True
  i=0
  while(sFlag):
    i=i+1
    pre=A_i
    N_list[A_i]+=1
    if(N_list[A_i]==3):
      sumA=N_list.count(int(2))
      K=(K-i)%sumA
      for j in range(K):
        pre=A_i
        te=A[A_i]
        A_i=te
      break
    te=A[A_i]
    A_i=te
    if(i>=K):
      sFlag=False
      break
  print(A_i+1)
  
if __name__ == '__main__':
    main()

### FIXED CODE ###

from sys import stdin
input = stdin.readline
def minus(n):
  return n-1
  
def main():
  num_list = list(map(int, input().split()))
  A = list(map(int, input().split()))
  N=num_list[0]
  K=num_list[1]
  A_i=0
  N_list=[0]*N
  A =list(map(minus, A))
  sFlag=True
  i=0
  while(sFlag):
    i=i+1
    pre=A_i
    N_list[A_i]+=1
    if(N_list[A_i]==3):
      sumA=N_list.count(int(2))
      sumA=sumA+N_list.count(int(3))
      K=(K-i)%sumA+1
      for j in range(K):
        pre=A_i
        te=A[A_i]
        A_i=te
      sFlag=False
      break
    te=A[A_i]
    A_i=te
    if(i>=K):
      sFlag=False
      break
  print(A_i+1)
  
if __name__ == '__main__':
    main()
w,h,n=map(int, input().split())
x=[]
y=[]
a=[]
for i in range(n):
  s=map(int, input().split())
  x.append(s[0])
  y.append(s[1])
  a.append(s[2])
x_l=0
x_h=w
y_l=0
y_h=h
for i in range(n):
  if a[i]==1:
    if x_l<x[i]:
      x_l=x[i]
  elif a[i]==2:
    if x_h>x[i]:
      x_h=x[i]
  elif a[i]==3:
    if y_l<y[i]:
      y_l=y[i]
  else:
    if y_h>y[i]:
      y_h=y[i]
s=(x_h-x_l)*(y_h-y_l)
if s>0:
  print(s)
else:
  print("0")

### FIXED CODE ###

w,h,n=map(int, input().split())
x=[]
y=[]
a=[]
for i in range(n):
  s=input().split()
  x.append(int(s[0]))
  y.append(int(s[1]))
  a.append(int(s[2]))
x_l=0
x_h=w
y_l=0
y_h=h
for i in range(n):
  if a[i]==1:
    if x_l<x[i]:
      x_l=x[i]
  elif a[i]==2:
    if x_h>x[i]:
      x_h=x[i]
  elif a[i]==3:
    if y_l<y[i]:
      y_l=y[i]
  else:
    if y_h>y[i]:
      y_h=y[i]
if x_h>x_l and y_h>y_l:
  print((x_h-x_l)*(y_h-y_l))
else:
  print("0")
N, L = map(int, input().split())
tmp = 0
for _ in range(N):
    tmp += L
    L += 1
if tmp == 0:
    print(0)
elif tmp > 0:
    if L=< 0:
        print(tmp)
    else:
        print(tmp-L)
else:
    if N > L:
        print(tmp)
    else:
        print(tmp-(N+L-1))
        

### FIXED CODE ###

N, L = map(int, input().split())
tmp = 0
i = L
for _ in range(N):
    tmp += i
    i += 1
if tmp == 0:
    print(0)
elif tmp > 0:
    if L < 1:
        print(tmp)
    else:
        print(tmp-L)
else:
    if N+L == 0:
        print(tmp+1)
    elif N + L > 0:
        print(tmp)
    else:
        print(tmp - N - L + 1)
from sys import stdin
import sys
import numpy as np
import collections
from functools import cmp_to_key
import heapq

##  input functions for me
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def rip(sep = ''):
    if sep == '' :
        return map(int, input().split()) 
    else: return map(int, input().split(sep))
def ria(sep = ''): 
    return list(rip(sep))
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
def main():
    N = ri()
    S = []
    T = []
    for i in range(N):
        S[i], T[i] = rip()
    X = ri()

    ans = 0
    sleep = False
    for i in range(N):
        if S[i] == X:
            sleep = True
            continue
        if sleep:
            ans += T[i]
    
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin
import sys
import numpy as np
import collections
from functools import cmp_to_key
import heapq

##  input functions for me
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def rip(sep = ''):
    if sep == '' :
        return map(int, input().split()) 
    else: return map(int, input().split(sep))
def ria(sep = ''): 
    return list(rip(sep))
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
def main():
    N = ri()
    S = ["a"] * N
    T = [0] * N
    for i in range(N):
        ss = rsa()
        S[i] , T[i] = ss[0], int(ss[1])
    X = rs()

    ans = 0
    sleep = False
    for i in range(N):
        if S[i] == X:
            sleep = True
            continue
        if sleep:
            ans += T[i]
    
    print(ans)


if __name__ == "__main__":
    main()
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
for i in range(M):
    x,y,c=map(int,input().split())
    tmp = a[x-1]+b[x-1]-c
    if ans==0:
        ans=tmp
    if min(a)+min(b) < tmp:
        ans=min(a)+min(b)
    else:
        ans=tmp
print(ans)

### FIXED CODE ###

A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
xyc=[list(map(int,input().split()))for i in range(M)]
ans=min(a)+min(b)
for i in range(M):
    tmp = a[xyc[i][0]-1]+b[xyc[i][1]-1]-xyc[i][2]
    if ans > tmp:
        ans=tmp
print(ans)
import bisect
N = int(input())
L = list(map(int,input().split()))
L.sort()
sum = 0
for i in range(0,N):
  L_1st= L[i]
  for j in range(i+1,N):
    L_2nd = L[j]
    c_min = b-a+1
    c_max = b+a-1
    l = bisect.bisect_left(L,c_min,lo = j+1)
    if l!= N:
      r = bisect.bisect_right(L,c_max,lo = j+1)
      if r:
        r = r-1
        if r>= l:
          sum += r-l+1
print(sum)


### FIXED CODE ###

import bisect
N = int(input())
L = list(map(int,input().split()))
L.sort()
sum = 0
for i in range(0,N):
  L_1st= L[i]
  for j in range(i+1,N):
    L_2nd = L[j]
    c_min = L_2nd-L_1st+1
    c_max = L_2nd+L_1st-1
    l = bisect.bisect_left(L,c_min,lo = j+1)
    if l!= N:
      r = bisect.bisect_right(L,c_max,lo = j+1)
      if r:
        r = r-1
        if r>= l:
          sum += r-l+1
print(sum)
a=int(input())
b=int(input())
c=int(input())
if a+b+c >= 22:
  print(bust)
else:
  print(win)

### FIXED CODE ###

a1,a2,a3=map(int, input().split()) 

if a1+a2+a3>=22:
    print("bust")
else:
    print("win")
A,B,C,K = map(int,input().split())
res = 0
if A>=K:
  res= 1*A
else:
  for b in range(K-A,B+1):
    c = K-A-b
    ans = 1*A + 0*b + (-1)*c
    res = max(res,ans)
print(res)

### FIXED CODE ###

S = input()
T = input()
flag = False
for i in "abcdefghijklmnopqrstuvwxyz":
  if T==S+i:
    print("Yes")
    flag = True
    break
if flag == False:
  print("No")
print(intput().count("1"))

### FIXED CODE ###

print(input().count("1"))
A,B,C=map(int,input().split())


if B+C <= A
print(0)

else B+C > A
print(C-A+B)

### FIXED CODE ###

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

answer = C-A+B

if answer >= 0:
	print(answer)

else :
	print(0)
import collections
 
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)
 
for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1
 
print(ans)
import collections

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)

for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1

print(ans)

### FIXED CODE ###

import collections
 
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
s=set()
cnt=collections.Counter(arr)
 
for i in range(n):
 if arr[i] in s:
   continue
 if cnt[arr[i]]>=2:
   s.add(arr[i])
 for j in range(2,10**6//arr[i]+1):
   s.add(arr[i]*j)
ans=0
for i in range(n):
 if arr[i] in s:
   continue
 ans+=1
 
print(ans)
A,B,C,D = map(int,input().split())

#N = int(input())

#list(map(int,input().split()))

cnt = B-A+1

import math
E = C*D / math.gcd(C, D)


A_C = A//C
A_dC = A%C

B_C = B//C
#B_dC = B%C

A_D = A//D
A_dD = A%D

B_D = B//D
#B_dD = B%D

A_E = A//E
A_dE = A%E

B_E = B//E
#B_dE = B%E

C_cnt = B_C - A_C
if A_dC == 0:
    C_cnt += 1
D_cnt = B_D - A_D
if A_dD == 0:
    D_cnt += 1
E_cnt = B_E - A_E
if A_dE == 0:
    E_cnt += 1  

ans = cnt - C_cnt - D_cnt + E_cnt
print(int(ans))


### FIXED CODE ###


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

#N = int(input())

#list(map(int,input().split()))

cnt = B-A+1

import fractions
E = C*D // fractions.gcd(C, D)


A_C = A//C
A_dC = A%C

B_C = B//C
#B_dC = B%C

A_D = A//D
A_dD = A%D

B_D = B//D
#B_dD = B%D

A_E = A//E
A_dE = A%E

B_E = B//E
#B_dE = B%E

C_cnt = B_C - A_C
if A_dC == 0:
    C_cnt += 1
D_cnt = B_D - A_D
if A_dD == 0:
    D_cnt += 1
E_cnt = B_E - A_E
if A_dE == 0:
    E_cnt += 1  

ans = cnt - C_cnt - D_cnt + E_cnt
print(int(ans))
d, n = map(int, input().split())
print((100 ** d) * n if n % 100 != 0)
print((100 ** d) * (n+1) if n % 100 == 0)

### FIXED CODE ###

d, n = map(int, input().split())
if n % 100 != 0:
    print((100 ** d) * n)
if n % 100 == 0:
    print((100 ** d) * (n+1))
n,k = map(int, input().split())
ans = 2*k+1
if ans > n:
    print(“No”)
else:
    print(“Yes”)


### FIXED CODE ###

n,k = map(int, input().split())
ans = 2*k-1
if n < ans:
  print('NO')
else:
  print('YES')
n = int(input())                                                            
  for i in range(n + 1):
      if i != 0 and i % 3 == 0:
          print(' ' + i,end='')
      elif '3' in str(i):
          print(' ' + i,end='')

### FIXED CODE ###

n = int(input())
for i in range(n + 1):
    if i != 0:
        if i % 3 == 0 or '3' in str(i):
            print('',i,end='')                                                  
print()
def BFS(s = 0, time = 0):
    d[s] = time
    if len(Q) != 0:
        Q.pop(0)
        color[s] = 2
    for j in range(len(d)):
        if A[i][j] == 1 and color[j] == 0:
            Q.append(A[i][j])
            color[j] = 1
    for j in range(Q):
        time = time + 1
        BFS(Q[j], time)

n = int(raw_input())
A = [0] * n
for i in range(n):
    A[i] = [0] * n

for i in range(n):
    value = map(int, raw_input().split())
    u = value[0] - 1
    k = value[1]
    nodes = value[2:]
    for j in range(k):
        v = nodes[j] - 1
        A[u][v] = 1

color = [0] * n
Q = [0]
d = [-1] * n

BFS(0, 0)

for i in range(n):
    print(str(i + 1) + " " + str(d[i]))

### FIXED CODE ###


def BFS(s = 0):
    Q.pop(0)
    color[s] = 2
    for j in range(len(color)):
        if A[s][j] == 1 and color[j] == 0:
            Q.append(j)
            color[j] = 1
            d[j] = d[s] + 1
    if len(Q) != 0:
        BFS(Q[0])

n = int(raw_input())
A = [0] * n
for i in range(n):
    A[i] = [0] * n

for i in range(n):
    value = map(int, raw_input().split())
    u = value[0] - 1
    k = value[1]
    nodes = value[2:]
    for j in range(k):
        v = nodes[j] - 1
        A[u][v] = 1

color = [0] * n
Q = [0]
d = [-1] * n
d[0] = 0

BFS(0)

for i in range(n):
    print(str(i + 1) + " " + str(d[i]))
def main():
    n = int(input())
    s = [["" for j in range(10)] for i in range(n)]

    for i in range(n):
        s[i] = list(input()).sort()

    print(int(count_anagram(s[0], s[1:], 0)))


def count_anagram(s, str_list, total):
    cnt = 0
    tmp = []
    for i, t in enumerate(str_list):
        if s == t:
            cnt += 1
            tmp.append(i)
    if cnt > 0:
        total += (cnt+1) * cnt / 2
        for i in tmp:
            str_list.pop(i)

    if str_list:
        return count_anagram(str_list[0], str_list[1:], total)
    else:
        return total


if __name__ == '__main__':
    main()


### FIXED CODE ###

import collections

n = int(input())
s = ["".join(sorted(input())) for i in range(n)]

counter = collections.Counter(s)

ans = 0
for i in counter.values():
   if i > 0:
        ans += i * (i - 1) // 2

print(ans)
N,M = map(int, input().split())
A = sorted([int(i) for i in input().split()])
C = sorted([[int(i) for i in input().split()] for _ in range(M)],
           reverse=True, key=lambda x: x[1])
index, flag = 0, False

for cnt, value in C:
    for _ in range(cnt):
        if A[index] >= value:
            flag = True
            break
        A[index] = value
        index += 1
    if flag: break
print(sum(A))

### FIXED CODE ###

def check():
    N, M = map(int, input().split())
    A = sorted([int(i) for i in input().split()])
    sousa = sorted([[int(i) for i in input().split()] for i in range(M)],
                   reverse=True, key=lambda x:x[1])
    index = 0
    for cnt, value in sousa:
        for i in range(cnt):
            if index == N:
                break
            if A[index] < value:
                A[index] = value
            else:
                return(sum(A))
            index += 1
    return(sum(A))
print(check())
while 1:
    try:
        ript = raw_input()
    except EOFError:
        break;
    ipt = ript.split()
    s = []
    for i in range(len(ipt)):
        if ipt[i].isdigit():
            s.append(float(ipt[i]))
        else:
            b = s.pop(); a = s.pop();
            if ipt[i]=='+':
                s.append(a+b)
            elif ipt[i]=='-':
                s.append(a-b)
            elif ipt[i]=='*':
                s.append(a*b)
            else:
                s.append(a/b)
    print "%.6f"%s[0]

### FIXED CODE ###

import sys
for s in sys.stdin.readlines():
    st = []
    for c in s.strip().split():
        if c=='+':
            st.append(st.pop()+st.pop())
        elif c=='-':
            st.append(-st.pop()+st.pop())
        elif c=='*':
            st.append(st.pop()*st.pop())
        elif c=='/':
            st.append(1/st.pop()*st.pop())
        else:
            st.append(float(c))
    print st.pop()
n=int(input())
a=list(map(int,input().split()))

#箱の状態を記録しておく配列
box=[0]*n


for i in range(1,n+1):
  num=n-i

  #まず割って、その数より大きい倍数がいくつあるか探る
  baisu=n//num

  if baisu==1:
    box[num-1]=a[num-1]

  #1～baisu倍の箱の状態を調べる。
  temp=0
  for j in range(2,baisu+1):
    temp+=box[num*j-1]
  box[num-1]=abs(temp%2-a[num-1])

ans=[]
for i in range(n):
  if box[i]==1:
    ans.append(i+1)

if sum(ans)!=0:
  print(len(ans))
  print(*ans)
else:
  print("0")

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))

#箱の状態を記録しておく配列
box=[0]*n


for i in range(n):
  num=n-i

  #まず割って、その数より大きい倍数がいくつあるか探る
  baisu=n//num

  if baisu==1:
    box[num-1]=a[num-1]

  #1～baisu倍の箱の状態を調べる。
  temp=0
  for j in range(2,baisu+1):
    temp+=box[num*j-1]
  box[num-1]=abs(temp%2-a[num-1])

ans=[]
for i in range(n):
  if box[i]==1:
    ans.append(i+1)

if sum(ans)!=0:
  print(len(ans))
  print(*ans)
else:
  print("0")
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")

### FIXED CODE ###

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")
S=input()
print(S[4]"8")

### FIXED CODE ###

S=input()
print("2018"+S[4:])
#!/usr/bin/python3

from math import floor

while True:
    n = eval(input())
    if n != 0:
        ls = []
        for i in range(n):
            m = eval(input())
            ls.append(m)
        ls.remove(max(ls))
        ls.remove(min(ls))
        print(floor(sum(ls)/len(ls)))
    else:
        break

### FIXED CODE ###

#!/usr/bin/python3

from math import floor

while True:
    n = eval(input())
    if n != 0:
        ls = []
        for i in range(n):
            m = eval(input())
            ls.append(m)
        ls.remove(max(ls))
        ls.remove(min(ls))
        print(floor(sum(ls)/len(ls)))
    else:
        break
st = input()
stin = st.split()
a = int(stin[0])
b = int(stin[1])
if a<b:
    print('a < b')
elif a>b:
    print('a > b')
elif a==b:
    printf('a == b')



### FIXED CODE ###

st = input()
stin = st.split()
a = int(stin[0])
b = int(stin[1])
if a<b:
    print('a < b')
elif a>b:
    print('a > b')
elif a==b:
    print('a == b')
n = int(input())
b = list(map(int,input().split()))
c=0

if n == 1:
    print(b[0]*2+b[1])
elif n==2:
    print(b[-1]+min(b[0],b[1])*2)
else:    
    for i in range(n-2):
        c = c + min(b[i],b[i+1])
    print(c+b[-1])

### FIXED CODE ###

n = int(input())
b = list(map(int,input().split()))
c=0

if n == 2:
    print(b[0]*2)
elif n==3:
    print(b[1]+min(b[0],b[1])*2)
else:
    co = [min(x , y) for (x, y) in zip(b[0:-1], b[1:])]
    print(sum(co)+b[-1]+b[0])
five_dish = [int(input()) for _ in range(5)]
idx = None
maxdiff = 0
result = 0
for i in range(len(five_dish)):
    tmp = five_dish[i] % 10
    if tmp == 0:
        continue
    else:
        if 10 - tmp >= maxdiff:
            maxdiff = 10 - tmp
            idx = i
        else:
            continue
for j in range(len(five_dish)):
    if j == idx:
        continue
    else:
        if five_dish[j] % 10 == 0:
            result += five_dish[j]
        else:
            result += five_dish[j] + (10 - five_dish[j] % 10)
result += five_dish[idx]
print(result)


### FIXED CODE ###

five_dish = [int(input()) for _ in range(5)]
idx = 0
maxdiff = 0
result = 0
for i in range(len(five_dish)):
    tmp = five_dish[i] % 10
    if tmp != 0:
        if 10 - tmp > maxdiff:
            maxdiff = 10 - tmp
            idx = i
for j in range(len(five_dish)):
    if j == idx:
        continue
    else:
        if five_dish[j] % 10 == 0:
            result += five_dish[j]
        else:
            result += five_dish[j] + (10 - (five_dish[j] % 10))
result += five_dish[idx]
print(result)
from collectins import deque
print(1)

### FIXED CODE ###

from collections import deque

def isPa(w,k,p):
    tr = 0
    c = 0
    d = deque(w)
    while(d):
        tmp = d.popleft()
        if(tmp > p):
            return False
        
        if( tr + tmp > p):
            tr = tmp
            c += 1
        else:
            tr += tmp
        if c+1>k:
            return False
    return True

def MaxInP(w,k,p):
    maxinp = 0
    tmp = 0
    d = deque(w)
    while(d):
        tmp += d.popleft();
        if(tmp > p):
            if(tmp > maxinp):
                maxinp = tmp
            tmp = 0
    return maxinp

n,k = [int(x) for x in input().split()]
w = deque()
for i in range(n):
    w.append(int(input()))
    
mean = int(sum(w)/k)
maxinp = MaxInP(w,k,mean)

if k == 1:
    print(mean)
else:
    minP = mean
    maxP = maxinp
    while(True):
        m = int ((minP + maxP)/2)
        if ( isPa(w,k,m) ):
            maxP = m
        else:
            minP = m
        if (minP+1 == maxP or minP == maxP):
            print(maxP)
            break
n = int(input())
g = []
d = [0] * (n + 1)
for i in range(n + 1):
    g.append([]);
for i in range(n - 1):
    u, v, w = map(int, input().split())
    g[u].append([v, w])
    g[v].append([u, w])
q, k = map(int, input().split())
def dfs(u, f, w):
    d[u] = w;
    for go in g[u]:
        if go[0] != f:
            dfs(go[0], u, go[1] + w)
dfs(k, k, 0)
while q > 0:
    u, v = map(int, input().split())
    print(d[u] + d[v])
    q -= 1


### FIXED CODE ###

n = int(input())
g = []
d = [0] * (n + 1)
for i in range(n + 1):
    g.append([]);
for i in range(n - 1):
    u, v, w = map(int, input().split())
    g[u].append([v, w])
    g[v].append([u, w])
q, k = map(int, input().split())
def bfs(u):
    s = []
    s.append(u)
    while s:
        v = s[-1]
        s.pop()
        for go in g[v]:
            if not d[go[0]] and go[0] != u:
                d[go[0]] = d[v] + go[1]
                s.append(go[0])
bfs(k)
while q > 0:
    u, v = map(int, input().split())
    print(d[u] + d[v])
    q -= 1
n = input()
    R = []

    for i in range(n):
        R.append(input())
 
    max = R[1] - R[0]
    min = R[0]
 
    for i+1 in range(n):
        if R[i]-min>max:
            max = R[i] - min
        if R[i]<min:
            min = R[i]
 
    print max

### FIXED CODE ###

n = input()

R = [input() for i in range(n)]
  
max = R[1] - R[0]
min = R[0]
  
for i in range(1,n):
    if R[i] - min > max:
        max = R[i] - min
    if R[i] < min:
        min = R[i]
  
print max
from collections import Counter
n=int,input()
a=list(map(int,input().split()))
for i in range(n):
    a.append(a[i]-1)
    a.append(a[i]+1)
c=Counter(a).most_common()
print(c[0][1])

### FIXED CODE ###

from collections import Counter
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    a.append(a[i]-1)
    a.append(a[i]+1)
c=Counter(a).most_common()
print(c[0][1])
w,h,x,y=map(int,input().split())

w2=w//2
h2=h//2

s1=h*w2
s2=w*h2
err1=(s1-s2)/s1
if -1.0*10**(-9)<err1 and err1<1.0*10**(-9):
    print(s1,1)
elif s1>s2:
    print(s1,0)
else:
    print(s2,0)

### FIXED CODE ###

w,h,x,y=map(int,input().split())

if w/2==x and h/2==y:
    print(0.5*h*w,1)
else:
    print(0.5*h*w,0)
N = int(input())
print(N*(n-1)//2)

### FIXED CODE ###

N = int(input())
print(N*(N-1)//2)
from dataclasses import dataclass
from operator import itemgetter, attrgetter

@dataclass
class P:
    x: float
    y: float
    def __add__(self, p: P): return P(self.x + p.x, self.y + p.y)
    def __sub__(self, p: P): return P(self.x - p.x, self.y - p.y)
    def dot(self, p: P): return (self.x*p.x + self.y*p.y)
    def cross(self, p: P): return (self.x*p.y - self.y*p.x)
    def abs(self): return (abs(self.x) + abs(self.y))

def convex_hull(Ps):
    Ps.sort(key=attrgetter('x', 'y'))
    ret1, ret2 = list(), list()
    for i in range(len(Ps)):
        k = len(ret1)
        while k>=2 and (Ps[i]-ret1[k-1]).cross(ret1[k-1]-ret1[k-2]) <= 0:
            ret1.pop()
            k = len(ret1)
        ret1.append(Ps[i])
    for i in range(len(Ps)):
        k = len(ret2)
        while k>=2 and (Ps[i]-ret2[k-1]).cross(ret2[k-1]-ret2[k-2]) >= 0:
            ret2.pop()
            k = len(ret2)
        ret2.append(Ps[i])
    return ret1 + ret2[::-1]

N = int(input())
Ps = list()
for i in range(N):
    x, y = list(map(int, input().split()))
    Ps.append(P(x, y))

# produce convex hull
CPs = convex_hull(Ps)

# brute force
ans = 0
for i in range(len(CPs)):
    for j in range(i, len(CPs)):
        mdis = (CPs[i]-CPs[j]).abs()
#        print(i, j, mdis)
        if ans < mdis: ans = mdis

print (ans)


### FIXED CODE ###

from operator import itemgetter, attrgetter

class P:
    def __init__(self, x, y):
        self.x, self.y = x, y
    def __add__(self, p): return P(self.x + p.x, self.y + p.y)
    def __sub__(self, p): return P(self.x - p.x, self.y - p.y)
    def dot(self, p): return (self.x*p.x + self.y*p.y)
    def cross(self, p): return (self.x*p.y - self.y*p.x)
    def abs(self): return (abs(self.x) + abs(self.y))

def convex_hull(Ps):
    Ps.sort(key=attrgetter('x', 'y'))
    ret1, ret2 = list(), list()
    for i in range(len(Ps)):
        k = len(ret1)
        while k>=2 and (Ps[i]-ret1[k-1]).cross(ret1[k-1]-ret1[k-2]) <= 0:
            ret1.pop()
            k = len(ret1)
        ret1.append(Ps[i])
    for i in range(len(Ps)):
        k = len(ret2)
        while k>=2 and (Ps[i]-ret2[k-1]).cross(ret2[k-1]-ret2[k-2]) >= 0:
            ret2.pop()
            k = len(ret2)
        ret2.append(Ps[i])
    return ret1 + ret2[::-1]

N = int(input())
Ps = list()
for i in range(N):
    x, y = list(map(int, input().split()))
    Ps.append(P(x, y))

# produce convex hull
CPs = convex_hull(Ps)

# brute force
ans = 0
for i in range(len(CPs)):
    for j in range(i, len(CPs)):
        mdis = (CPs[i]-CPs[j]).abs()
#        print(i, j, mdis)
        if ans < mdis: ans = mdis

print (ans)
N=int(input())
if N==1:
    print('Hello World')
elif N==2:
    A,B=map(int,input().split())
    print(A+B)

### FIXED CODE ###

N=int(input())
if N==1:
    print('Hello World')
else:
    A=int(input())
    B=int(input())
    print(A+B)