peterverebics/CodeNet_Python_118 huggingface dataset:
w,h,x,y = map(int, input().split())

calc = w * h / 2
flg = 1
if w/2 == x and h/2 == y:
    flg = 0
print(str(calc) + ' ' + str(flg))
W, H, x, y = map(int, input().split())

if W // 2 == x and H // 2 == y:
    print(W * H / 2, 1)
else:
    print(W * H / 2, 0)
import sys
W,H,x,y = map(int,input().split())
if (x,y) == (W/2,H/2):
  print('{} {}'.format(W*H/2,'1'))
  sys.exit(0)
else: #On rectangle
  if (x == 0 or x == W):
    print('{} {}'.format(W*max(y,H-y)*0,5,'0'))
  if (y == 0 or y == H):
    print('{} {}'.format(W*max(x,W-x)*0,5,'0'))
  #else Inside rectangle
w,h,x,y=map(int,input().strip().split())
t=x*h!=y*w and x*2!=w and y*2!=h
if x*2==w and y*2==h:t=1
print(w*h/2,1*t)
h, w, x, y = map(int, input().split())
half = h*w / 2
if x == w - x and y == h - y:
    p = 1
else:
    p = 0

print(half, p)
w,h,x,y = list(map(int, input().split()))

if((x == w//2 and y == h//2)):
  print((w*h)//2 , 1)
else:
  print((w*h)//2, 0)
W, H, x, y = map(int, input().split())

if x == W / 2 and y == H / 2:
    print(W*H/2, 1)
    exit()

if abs(x-W/2) < abs(y-H/2):
    ans = min(x, W-x) * H
else:
    ans = W * min(y,H-y)

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

area_x1 = x * H
area_x2 = (W-x) * H
if area_x1 != 0 and area_x2 != 0:
    area_x = min(area_x1, area_x2)
else:
    area_x = max(area_x1, area_x2)

area_y1 = W * y
area_y2 = W * (H-y)
if area_y1 != 0 and area_y2 != 0:
    area_y = min(area_y1, area_y2)
else:
    area_y = max(area_y1, area_y2)

ans1 = max(area_x, area_y)
if W/2 == x and H/2 == y:
    ans2 = 1
else:
    ans2 = 0
print(ans1, ans2)
W, H, x, y = map(int, input().split())
a_area = min([x*H, H*(W-x)])
b_area = min([y*W, W*(H-y)])

if a_area == b_area:
    print(max(a_area,b_area),1)
else:
    print(max(a_area,b_area),0)
w,h,x,y = map(int, input().split())
if w//2 == x and h//2 == y:
    print(x*y*2,'1')
else:
    s1 = min(abs(w-x),x)*h
    s2 = min(abs(h-y),y)*w
    print(max(s1,s2),'0')
W,H,x,y = map(int,input().split())

A_1 = (W - x) * H
A_2 = x * H
B_1 = W * (H - y)
B_2 = W * y

if A_1 < A_2:
  A = A_1
else:
  A = A_2
if B_1 < B_2:
  B = B_1
else:
  B = B_2
if A < B:
  print(str(A) + '  0')
elif B < A:
  print(str(B) + '  0')
else:
  print(str(B) + '  1')
w,h,x,y = map(int,input().split())

flg = 0
s=0

if x<=w/2 and y <= h/2:
    s = max(x*h,w*y)
elif x<=w/2 and y>h/2:
    s = max(x*h,w*(h-y))
elif x>w/2 and y <= h/2:
    s = max( (w-x)*h , w*y)
else:
    s = max( (w-x)*h, w*(h-y))

if x==w/2 and y==h/2:
    flg = 1

print(s,flg)
w,h,x,y=map(int,input().split())
if x==0 or x==w or y==0 or y==h:
    print(w*h/2, 0)
    exit()
a=min(x,w-x)*h
b=min(y,h-y)*w
if a==b:
    c=1
else:
    c=0
print(max(a,b), c)
W, H, x, y = map(int, input().split())

S = W * H
sita = S * (y / H)
ue = S - sita
hidari = S * (x / W)
migi = S - hidari
all_S = [sita, hidari, ue, migi]
min_S = min(all_S)
all_S.remove(min_S)
print(min_S, end=' ')
print(int(bool(all_S.count(min_S))))
w, h, x, y = map(int, input().split())
flag = 0
if x == w//2 and y == h//2:
    flag = 1
print(w*h/2, flag)
W,H,x,y = list(map(int, input().split()))

def ans(a, b, c, d):
    if (c == a / 2) and (b == b / 2):
        return 0
    else:
        return 1
        
print(W * H / 2,ans(W, H, x, y))
W, H, x, y = map(int, input().split())

if x == (W // 2) and y == (H//2):
        print(H * (W // 2), 1)
        
elif 0 < x < W:
    mini1 = min(H * x, H * (W - x))
    mini2 = min(y * W, (H - y) * W)
    print(max(mini1,mini2), 0)
else:
    if 0 < y < H:
        print(min(y * W, (H - y) * W), 0)
    else:
        print(H*W,1)
w,h,x,y = map(int, input().split())

ans = 0.000000000
ans = ans + max(min(x/w, (w-x)/w), min(y/h,(h-y)/h))

print(ans*w*h, end=" ")
if min(x/w, (w-x)/w)==min(y/h,(h-y)/h):
	print(1)
else:
	print(0)
W,H,X,Y=map(int,input().split())

ans2=0
if W==H:
    ans2=1

ans1=max(min(X*H,(W-X)*H),min(W*Y,W*(H-Y)))

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

menseki = W*H
mensekix = min(x, W-x) * H
mensekiy = W * min(y, H-y)
ans1 = max(mensekix, mensekiy)

if mensekix == mensekiy:
    ans2 = 1
else:
    ans2 = 0
print(ans1, ans2)
W,H,x,y=map(int,open(0).read().split())
all=W*H
A1=x*H
A2=all-A1
B1=W*y
B2=all-B1

minA=min(A1,A2)
minB=min(B1,B2)
if minA==minB:
    print(minA,1)
else:
    print(max(minA,minB),0)
W, H, x, y = [int(x) for x in input().split()]

max_value = -1

# x軸と平行な直線で区切る場合
max_value = max(max_value, min((W-x)*H, x*H))

# y軸に平行な直線で区切る場合
max_value = max(max_value, min(W*(H-y), W*y))

flg = W-x == x and H-y == y 
print(max_value, 1 if flg else 0)
W,H,x,y = map(int, input().split())
answer = 1/2*W*H
print(answer)
import sys
input=sys.stdin.buffer.readline
import os
from math import*


w,h,x,y=map(int,input().split())
area=w*h
ans1=min((w*y),(area-(w*y)))
ans2=min((x*h),(area-(x*h)))
if ans1==ans2:
	print(ans1,1)
else:
	print(max(ans1,ans2),0)
from decimal import *
W, H, x, y = list(map(int, input().split()))

print("{:.5f}".format(Decimal(W) * Decimal(H) / Decimal(2)), 1 if x == W//2 and y == H//2 else 0)
W,H,x,y = map(int,input().split())
if (x != W/2 and y != H/2) and(((x == 0 or x == W) and (y == 0 or y == H)) or (x == W/2 or y == H/2 or y == -(H*x/W)+H or y == (H*x)/W)):
  print(W*H/2,0)
  
else:
  print(W*H/2,1)
W, H, u, v = map(int, input().split())

if u <= W / 2:
    areaX = H * u
else:
    areaX = H * (W - u)

if v <= H / 2:
    areaY = W * v
else:
    areaY = W * (H - v)

e = 10 ** (-8)
ans = []
if areaX - areaY < e:
    ans.append(areaX)
    ans.append(1)
elif areaX < areaY:
    ans.append(areaY)
    ans.append(0)
else:
    ans.append(areaX)
    ans.append(0)

print(*ans)
w,h,x,y = map(int,input().split())
tmp1 = abs(w-x)
tmp2 = abs(h-y)

ans = w*h/2

if w == x/2 and h == y/2:
    print(ans,1)
else:
    print(ans,0)
W,H,w,h = map(float, input().split())
ans =0
if w/W+h/H == 1:
    ans =1
elif w/W == h/H:
    ans =1
    
ls =[float(w*h/2), ans]
print(*ls)
w,h,x,y = map(int, input().split())

ans = max(min(x/w, (w-x)/w), min(y/h,(h-y)/h))

print(ans*w*h, end=" ")
if min(x/w, (w-x)/w)==min(y/h,(h-y)/h):
	print(1)
else:
	print(0)
w,h,x,y = map(int,input().split())
s1 = w*y
s2 = w*(h-y)
s3 = h*x
s4 = h*(w-x)
if s1 > s2:
    s5 = s2
else:
    s5 = s1
if s3 > s4:
    s6 = s4
else:
    s6 = s3
if s6 > s5:
    print(float(s5),' 0')
elif s6 < s5:
    print(float(s5),' 0')
else:
    print(float(s6),' 1')
W,H,x,y = map(int,input().split())

if x == W//2 and y == H//2:
  res = 1
else:
  res = 0
  
print(W*H/2,res)
w,h,x,y = map(int,input().split())

area = (w*h/2)
c = 0

if (x == w//2) and (y == h//2):
    c = 1

print(area,c)
W,H,w,h = map(float, input().split())
ans =0
if w/W+h/H == 1:
    ans =1
elif w/W == h/H:
    ans =1
    
ls =[float(w*h/2), ' ', ans]
print(*ls)
w, h, x, y = map(int, input().split())

a = min((w-x)*h, x*h)
b = min(w*(h-y), w*y)

if x == 0 and y == 0 or x == 0 and y == h or x == w and y == 0 or x == w and y == h:
    print(w*h/2, 1)
else:
    print(max(a, b), 1 if a == b else 0)
w, h, x, y = [int(i) for i in input().split()]
print(w * h / 2, int(x == (w // 2) or y == (h // 2)))
w, h, x, y = map(int, input().split())
menseki1 = min(w - x, x) * h
menseki2 = min(h - y, y) * w
hantei = menseki1 == menseki2
print(max(menseki1, menseki2), int(hantei))
w,h,x,y = map(float, input().split())

s1 = []
s1.append(x*h)
s1.append((w-x)*h)
s2 = []
s2.append(w*y)
s2.append(w*(h-y))
s1.sort()
s2.sort()

if s1[0] > s2[0]:
    print("{} {}".format(s1[0], 0 if s1[0]==s1[1] else 1))
else:
    print("{} {}".format(s2[0], 0 if s2[0]==s2[1] else 1))
W, H, x, y = map(int, input().split())
ans1 = min(x * H, (W - x) * H)
ans2 = min(W * y, W * (H - y))
ans3 = 0
if W / 2 == x and H / 2 == y:
    ans3 = (1/2) * (W * H)
if ans1 == ans2:
    print("{} {}".format(ans1, 1))
else:
    print("{} {}".format(max(ans1, ans2, ans3),0))
# coding: utf-8

def solve(W, H, x, y):
  mw, mh = W // 2, H // 2
  return f'{W * H / 2} {int((x, y) == (mw, mh))}'


if __name__ == '__main__':
  print(solve(*map(int, input().split())))
def solve():
    gx,gy = False, False
    if W/2 == x:
        gx = True
    if H/2 == y:
        gy = True
    A1 = min(x*H, (W-x)*H)
    A2 = min(x*y, x*(H-y))
#    print(A1)
    ans = max(A1, A2)
#    print(gx,gy)
    if gx and gy:
        print(ans, 1)
    else:
        print(ans, 0)

    

if __name__ == "__main__":
    W,H,x,y = list(map(int, input().split()))
    solve()
def solve():
    gx,gy = False, False
    if W/2 == x:
        gx = True
    if H/2 == y:
        gy = True
    A1 = min(x*H, (W-x)*H)
    A2 = min(x*y, x*(H-y))
#    print(A1)
    ans = max(A1, A2)
#    print(gx,gy)
    if gx and gy:
        print(ans, 1)
    else:
        print(ans, 0)

    

if __name__ == "__main__":
    W,H,x,y = list(map(float, input().split()))
    solve()
# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(W, H, x, y):
    print(W * H / 2, 1 if x == W // 2 and y == H // 2 else 0)

if __name__ == '__main__':
    input = sys.stdin.readline
    W, H, x, y = map(int, input().split())
    main(W, H, x, y)
W, H, x, y = map(int, input().split())

S = W * H
sx = min(W-x, x-0) * H
sy = min(H-y, y-0) * W

print(max(sx, sy), int(sx == sy))
w, h, x, y = map(int, input().split())
ans = w*h/2
if h/2 == x and w/2 == y:
    flag = 1
else:
    flag = 0
print('{} {}'.format(ans, flag))
def main():
    W, H, x, y = map(int, input().split())

    s1 = min(x * H, (W - x) * H)
    s2 = min(W * y, W * (H - y))
    #print(f's1:{s1}, s2:{s2}')
    ans = max(s1, s2)
    flag = 0
    if W==H and ans == (W * H) // 2: flag = 1
    print(ans, flag)


if __name__ == '__main__':
    main()
W, H, x, y = map(int, input().split())

area = (W * H) / 2
div = 0
if W // 2 == x and H // 2 == y:
    div = 1

print(area, div)
def main():
    w, h, x, y = map(int, input().split())
    area = min(h * x, y * w)
    area = min(w * h - area, area)
    print(area, end=" ")
    print(1 if 2 * x == w and 2 * y == h else 0)


if __name__ == '__main__':
    main()
W, H, x, y = map(int, input().split())
ans1 = min(x * H, (W - x) * H)
ans2 = min(W * y, W * (H - y))
if ans1 == ans2:
    print("{} {}".format(ans1, 1))
else:
    print("{} {}".format(max(ans1, ans2),0))
W, H, x, y = map(int, input().split())

area1 = min(H * x, H * (W - x))
area2 = min(W * y, W * (H - y))

method = "0"
if area1 == area2 : method = "1"

ans = max(area1, area2)
print(ans, method)
W, H, x, y = map(int, input().split())

print(
  max(
    min(H * x, H * (W - x)),
    min(y * W, (H - y) * W)
  ),
  1 if min(H * x, H * (W - x)) == min(y * W, (H - y) * W) else 0
)
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

W, H, x, y = rl()

area = (H*W)/2.0
flag = 1
if x == 0 or x == W or y == 0 or y == H:
	flag = 0
print(area, flag)
w,h,x,y = map(int,input().split())
check = 0
area = w * h
max_min = max(min(x / w,(w-x)/w),min(y/h,(h-y)/h))
if min(x / w,(w-x)/w) == min(y/h,(h-y)/h):
  check = 1
print(area * max_min,check)
# AtCoder Beginner Contest 130
# C - Rectangle Cutting

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

if (x,y)==(0,0) or (x,y)==(W,0) or (x,y)==(W,H) or (x,y)==(0,H):
    print(W*H/2 , 0)
W,H,x,y=map(int,input().split())
hy=W*(H-y)
by=W*y
rx=(W-x)*H
lx=x*H
arry={hy,by}
arrx={rx,lx}
miny=min(arry)
minx=min(arrx)
ans=max({miny,minx})
cnt=-1
for val in arry:
  if ans==val:
    cnt+=1
for val in arrx:
  if ans==val:
    cnt+=1
print(str(ans)+" "+str(cnt))
w,h,x,y = map(int,input().split())
ans = w*h/2
if x == w//2 and y == h//2:
    ans_2 = 1
else:
    ans_2 = 0
print(ans,ans_2)
W,H,x,y = map(int,input().split())

horizontal = [W*(H-y),W*y]
vertical = [(W-x)*H, x*H]

if max(horizontal) > max(vertical):
  print(min(vertical), 0)
elif max(horizontal) < max(vertical):
  print(min(horizontal), 0)
else:
  print(min(min(horizontal),min(vertical)), 1)
W,H,x,y = map(int,input().split())

ans = W*H
if W/2 == x and H/2 == y:
  print(ans//2,1)
else:
  print(ans//2,0)
W,H,x,y = map(int,input().split())

if W!=H:
    print(str(W*H/2)+' '+'0')
else:
    print(str(W*H/2)+' '+'1')
W, H, x, y = map(int, input().split())

area = W*H // 2
pl = x == W // 2 and y == H // 2
print(area, int(pl))
W, H, x, y = map(int, input().split())
Wi = W * 10 ** 9
Hi = H * 10 ** 9
men = W * H / 2
judge = 0
if x == W // 2 and y == H // 2:
  judge = 1
print("{0:.9f} {1:.0f}".format(men, judge))
W,H,x,y = map(int, input().split())
print(W*H/2, 1 if W/2 == x or H/2 == y else 0)
w, h, x, y = map(int, input().split())

s1 = min(x, w-x) * h
s2 = min(y, h-y) * w

s = max(s1, s2)

if s1 == s2:
    print(s, '1')
else:
    print(s, '0')
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    w, h, x, y = map(int, readline().split())
    a = min(h*x, h*(w-x))
    b = min(w*y, w*(h-y))
    print('{:.10f}'.format(max(a, b)), end=' ')
    print(1) if a == b else print(0)
if __name__ == '__main__':
    main()
W,H,x,y = map(int,input().split())

n = (W*H)//2
if W == x*2 and H == y*2:
  print(n, 1)
else:
  print(n, 0)
W,H,x,y=map(int,input().split())
if x==W//2 and y==H//2:
  print(W*H/2,1)
else:
  print(W*H/2,0)
W, H, x, y = map(int, input().split())
print(format(W*H/2, '.9f'), 1 if (x == W//2) & (y == H//2) else 0)
w, h, x, y = map(int, input().split())
ans1 = min(x, w - x) * h
ans2 = min(y, h - y) * w
bo = 0
if ans1 == ans2:
    bo = 1

print(max(ans1, ans2), bo)
w,h,x,y = map(int,input().split())
s1 = w*y
s2 = w*(h-y)
s3 = h*x
s4 = h*(w-x)
if s1>s2:
    s5=s2
else:
    s5=s1
if s3>s4:
    s6=s4
else:
    s6=s3
if s6>s5:
    print(s6,' 0')
elif s6<s5:
    print(s5,' 0')
else:
    print(s6,' 1')
W,H,x,y = map(int,input().split())

tate = H
if 2*x >= W:
    tate *= W-x
else:
    tate *= x

yoko = W
if 2*y >= H:
    yoko *= H-y
else:
    yoko *= y

if tate == yoko:
    print(tate,1)
else:
    print(max(tate,yoko),0)
def main():
    w, h, x, y = map(int, input().split())
    print(h * w // 2, end=" ")
    print(1 if 2 * x == w and 2 * y == h else 0)


if __name__ == '__main__':
    main()
h,w,x,y=map(int, input().split())
print(h*w / 2, end = " ")
if(h//2 == y and w//2 == x):
    print(1)
else:
    print(0)
'''
Created on 2020/08/29

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  W,H,x,y=map(int,pin().split())
  ans=max(min(x,W-x)*H,min(y,H-y))
  pout(f"{ans} ")
  if W-x==x and H-y==y:
    print(1)
  else:
    print(0)
  return 
main()
W, H, x, y = map(int, input().split())

if W // 2 == x and H // 2 == y:
    print("{} {}".format(W * H / 2, 1))
else:
    print("{} {}".format(W * H / 2, 0))
W,H,x,y = map(int,input().split())
A = min(x*H,(W-x)*H)
B = min(y*W,(H-y)*W)
if A == B:
    print(A, 1)
else:
    print(max(A, B))
W, H, X, Y = map(int, input().split())

a1 = (H-Y) * W
a2 = Y * W
if a1==0 or a2==0:
    a12 = 0
else:
    a12 = min(a1, a2)

a3 = X * H
a4 = (W-X) * H
if a3==0 or a4==0:
    a34 = 0
else:
    a34 = min(a3, a4)

ans1 = max(a12, a34)
if a12==a34:
    ans2=1
else:
    ans2=0

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

m=0
m=min(W*y, H*x)

if x==W/2 and y==H/2:
    print(m, 1)
else:
    print(m, 0)
W, H, x, y = map(int, input().split())

print(
  max(
    min(H * x, H * (W - x)),
    min(y * W, (H - y) * W)
  ),
  1 if 2 * x == W and 2 * y == H else 0
)
W, H, x, y = map(int, input().split())

if W//2 == x and H//2 == y:
    print('{} {}'.format((W*H)/2 ,1))
else:
    print('{} {}'.format((W*H)/2, 0))
w, h, x, y = map(int, input().split())
mirx = min((x)*h,(w-x)*h)
miry = min(w*y,w*(h-y))
if mirx == miry:
    print(mirx, 1)
else:
    print(max(mirx, miry), 0)
w,h,x,y = map(int,input().split())
half = w * h / 2
check = 1
if x == (w / 2) or y == (h / 2):
    check = 0
print(half, check)
w, h, x, y = list(map(int, input().split()))
#b = list(map(int, input().split()))
s = [x*h, (w-x)*h]
s2 = [w*y, w*(h-y)]
print(max(min(s), min(s2)), end=" ")

if min(s) == min(s2):
    print(0)
else:
    print(1)
w, h, x, y = map(float, input().split())
if x in [0, w] or y in [0, h]:
  print(0, 0)
elif x/y == w/h:
  print(min(x*h, (w-x)*h), 1)
elif x/(h-y) == w/h:
  print(min(x*h, (w-x)*h), 1)
else:
  print(min(x*h, (w-x)*h, y*w, (h-y)*w), 0)
# -*- coding: utf-8 -*-
"""
Created on Tue May 12 00:13:44 2020

@author: shinba
"""

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

a1 = h*min(w-x,x)
a2 = w*min(h-y,y)

if a1 == a2:
    print(a1,1)
else:
    print(max(a1,a2),0)
W,H,x,y = map(int,input().split())
flg = 0
if W/2 == x and H/2 ==y:
    ans = (W*H)/2
    flg = 1
elif W/2 == x or H/2 ==y:
    ans = (W*H)/2
    flg = 0
else:
    tatemax = min(W-x,x)*H
    yokomax = min(H-y,y)*W
    if tatemax == yokomax:
        ans = tatemax
        flg =1
    else:
        ans = max(tatemax,yokomax)
        flg =0
print(str(ans)+ " " + str(flg))
w,h,x,y=map(int,input().split())
ans=w*h/2.000000000
a=0
if( ((x==0 or x==w) and (0<=y and y<=h)) or ((0<=x and x<=w) and (y==0 or y==h)) ):
  a=0
else:
  if(((x==w/2) and (0<=y and y<=h)) or ((0<=x and x<=w) and (y==h/2))):
    a=0
  else:
   	a=1
if(x==w/2 and y==h/2):a=1
print('{:.7f}'.format(ans),a) #小数点以下3位
w, h, x, y = map(int, input().split())


def can_split(w, h, x, y):
    if x == 0 or y == 0:
        return False
    elif x == w and y == h:
        return False
    else:
        return True


area1 = min(x, w - x) * h
area2 = min(y, h - y) * w

if area1 == area2 and can_split(w, h, x, y):
    print(max(area1, area2), 1)
else:
    print(max(area1, area2), 0)
w,h,x,y = map(int,input().split())
area = w*h/2
if x == w//2 and y == h//2:
    print(area, 1)
else:
    print(area,0)
W, H, x, y = map(int,input().split())

if (x == 0 and y == 0) or (x == W or y == H):
    print("{} {}".format(W * H /2, 0))

else:
    area_H = sorted([x * H, (W - x) * H])
    area_W = sorted([y * W, (H - y) * W])

    area_h = area_H[0]
    area_w = area_W[0]

    area = sorted([area_h, area_w])
    switch = int(area[0] == area[1])

    print("{} {}".format(float(area[1]), switch))
W, H, x, y = list(map(int, input().split()))
if x == W // 2 and y == H // 2:
    print('{} {}'.format(W * H / 2, 1))
else:
    print('{} {}'.format(W * H / 2, 0))
W,H,x,y=map(int,input().split())
ans1=min(x,W-x)*H
ans2=W*min(y,H-y)
if ans1!=ans2:
	print(min(ans1,ans2),0)
else:
	print(ans1,1)
h, w, x, y = map(int, input().split())
s = h * w / 2
p = 0
if w / 2 == x and h / 2 == y:
  p = 1
print(s, p)
W, H, x, y = map(float, input().split())
f = 0
if W / 2 == x and H / 2 == y:
    f = 1

if x == 0:
    if y == 0:
        print("{} {}".format(W*H/2, f))
    elif y == H:
        print("{} {}".format(W*H/2, f))
    else:
        print("{} {}".format(min(y, H-y)*W, f))

elif y/x == H/W or y == -(H/W)*x + H:
    print("{} {}".format(W*H/2, f))

else:
    print("{} {}".format(max(min(x, W-x)*H, min(y, H-y)*W), f))
w,h,x,y = map(int,input().split())
#必ず半分にできる…とはいえるのか？多分いえる。
#長方形の重心を通るようにひけばok.
ans = w*h/2
if x*2==w or y*2==h:
	print(ans, 1)
else:
	print(ans, 0)
# coding: utf-8

def solve(W, H, x, y):
  s1 = x * H if x <= W // 2 else (W - x) * H
  s2 = y * W if y <= H // 2 else (H - y) * W
  return f'{max(s1, s2)} {int(s1 == s2)}'


if __name__ == '__main__':
  print(solve(*map(int, input().split())))
w,h,x,y = map(int,input().split())
jud = 0
if x == w//2 and y == h//2:
    jud = 1
print(w*h/2,jud)
W,H,x,y = map(int, input().split())
if x==y==0 or (x==W and y==0) or (x==0 and y==H) or (x==W and y==H):
    print(W*H/2, 0)
    exit()
X = min(x, W-x) * H
Y = min(y, H-y) * W
ans = 0
if X == Y: ans = 1
print(max(X, y), ans)
W, H, x, y = map(int, raw_input().split())

A = min(W * y, W * (H - y))
B = min(H * x, H * (W - x))
E = 1 if A == B else 0
print max(A, B), E
w,h,x,y = map(int, input().split())
print(w*h/2, '1' if x==w/2 or y==h/2 else '0')
w, h, x, y = map(int, input().split())

scale = w * h


if x > w / 2:
  new_x = w - x
else:
  new_x = x

if y > h / 2:
  new_y = h - y
else:
  new_y = y

x_scale = float(new_x * h)
y_scale = float(new_y * w)

if x_scale == y_scale:
  print('{0:.9f} 1'.format(x_scale))
else:
  print('{0:.9f} 0'.format(max(x_scale, y_scale)))
W,H,x,y = map(int, input().split())
a,b = min(x*H,(W-x)*H),min(y*W,(H-y)*W)
print(max(a,b), 1 if x == y or (W-x) == y or (H-y) == x else 0)
W,H,x,y = map(int,input().split())

#print(W,H,x,y)
if x == W/2 and y == H/2:
    area =  "{0:.6f}".format(float(x*H))
    print(area,1)
else:
    area ="{0:.6f}".format(float(min((W-x)*H,x*H)))
    print(area,0)
def main():
    w, h, x, y = map(int, input().split())
    area = 0
    if x not in [0, w]:
        area = max(area, min(h * x, w * h - h * x))
    if y not in [0, h]:
        area = max(area, min(y * w, w * h - y * w))
    print(area, end=" ")
    print(1 if 2 * x == w and 2 * y == h else 0)


if __name__ == '__main__':
    main()
w,h,x,y=map(int,input().split())
if w/2==x and h/2==y:k=1
elif w/2==x or h/2==y:k=0
else:k=1
print(w*h/2,k)
W, H, x, y = list(map(int,input().split()))

y_min = min(W*y, W*(H-y))
x_min = min(H*x, H*(W-x))

if y_min == x_min:
    ans = 1
else:
    ans = 0
print(max(x_min, y_min), ans)
W,H,x,y = map(int,input().split())

a_1 = (W - x) * H
a_2 = x * H
b_1 = W * (H - y)
b_2 = W * y

if a_1 < a_2:
  a = a_1
else:
  a = a_2
if b_1 < b_2:
  b = b_1
else:
  b = b_2
if a > b:
  print(str(a) + '  0')
elif b > a:
  print(str(b) + '  0')
else:
  print(str(b) + '  1')
w,h,x,y = map(int, input().split())
if w//2 == x and h//2 == y: print((w*h)/2, 1)
else: print((w*h)/2, 0)
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import numpy as np
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))


w,h,x,y=input_list()
ans=w*h/2
mul=0
if w//2==x and h//2==y:
    mul=1

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

is_center = x * 2 == W and y * 2 == H
min_square = W * H / 2

print(min_square, is_center)
w,h,x,y = map(int,input().split())
print(w*h/2,1 if x == w//2 and y == h//2 else 0)
W,H,x,y = list(map(int,input().split()))

possibility = "0"

if x == int(W / 2) and y == int(H / 2):
  possibility = "1"
  
max = str(W * H / 2)

print(max,possibility)
w,h,x,y=list(map(int,input().split()))
ans=0
if max(w-x,x)<max(h-y,y):s=max(w-x,x)*h
elif max(w-x,x)>max(h-y,y):s=w*max(h-y,y)
else:
  s=max(w-x,x)*h
  ans=1
print(s,ans)
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    W, H, x, y = mi()

    s = W*H/2
    cut = 1 if W//2 == x and H//2 == y else 0

    print(s, cut)

    return

main()
import sys

input = lambda: sys.stdin.readline().rstrip()
INF = 10 ** 9 + 7


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

    area1 = -1
    if not(x == 0 or x == W):
        width = min(x, W - x)
        area1 = width * H

    area2 = -2
    if not(y == 0 or y == H):
        height = min(y, H - y)
        area2 = height * W

    ans = max(area1, area2)
    res = 1 if area1 == area2 else 0
    print(ans, res)


if __name__ == '__main__':
    solve()
W, H, x, y = map(int, input().split())

area = (W * H) / 2
div = 0
if W * H != 0 and W // 2 == x and H // 2 == y:
    div = 1

print(area, div)
w,h,x,y=list(map(int,input().split()))
ans=0
if x/w<y/h:s=max(w-x,x)*h
elif x/w>y/h:s=w*max(h-y,y)
else:
  s=max(w-x,x)*h
  ans=1
print(s,ans)
W,H,x,y = map(int,input().split())

if W!=H:
    print(str(W*H/2)+'0')
else:
    print(str(W*H/2)+'1')
w,h,x,y=list(map(int,input().split()))
ans=0
x1=max(w-x,x)
y1=max(h-y,y)
if x1<y1:s=x1*h
elif x1>y1:s=w*y1
else:
  s=x1*h
  ans=1
if w*h//2==s:ans=1
print(s,ans)
w,h,x,y=map(int,input().split())
ans=w*h/2,int(x==w/2 and y==h/2)
print(ans)
W,H,x,y = map(int,input().split())
print(W*H//2, 0+(2*x == W and 2*y == H))
w, h, x, y = map(int, input().split())

if x == w // 2 and y == h // 2:
    print(w * h / 2, 1)
else:
    print(w * h / 2, 0)