peterverebics/CodeNet_Python_118 huggingface dataset:
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)
#C - Rectangle Cutting
W,H,x,y = map(int,input().split())
def main(W,H,x,y):
    if W == x or H == y or x==0 or y==0:
        ans1 = W*H
        ans2 = 0
    else:
        tmp1 = min((W-x)*H,x*H)
        tmp2 = min(W*(H-y),W*y)
        ans1 = max(tmp1,tmp2)
        if tmp1 == tmp2:
            ans2 = 1
        else:
            ans2 = 0
    print(ans1,ans2)
main(W,H,x,y)
W, H, x, y = map(int, input().split())
if W//2 == x and H//2 == y:
    flag = 1
else:
    flag = 0
print (W*H/2, flag)
W, H, x, y = map(int, input().split())

S = W * H / 2

print (S, end = ' ')
if W == 2 * x and H == 2 ** y:
    print (1)
else:
    print (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 x == 0 and y == 0:
    pass
elif x == W and y == H:
    pass
elif area1 == area2:
    method = "1"


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

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

a=[]
judge=0

a.append(min(x,W-x)*H)
a.append(min(y,H-y)*W)

if a[0]==a[1]:
    judge=1

print(max(a),judge)
W, H, x, y = [int(i) for i in input().split()]
print(W*H / 2, int(x == y))
import math
def main():
    t = [int(t)for t in input().split()]
    w,h,x,y = t[0],t[1],t[2],t[3]

    left,right = x, w-x
    top, bottom = y, h-y

    s_ = [left*h,right*h,top*w,bottom*w]
    s_ = sorted(s_)
    print(s_[2],1 if s_[2]==s_[3] else 0)

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

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

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()

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)
import sys
input=sys.stdin.readline
w,h,x,y=map(int,input().split())
if w*y!=h*x:
    print(min(w*y,h*x),0)

else:print(min(w*y,h*x),1)
W,H,x,y = map(int,input().split())

flag = 1 if x==y else 0

print(str(W*H/2) + " " + str(flag))
w, h, x, y = map(int, input().split())
h_y = abs(y - h/2)
w_x = abs(x - w/2)
yoko = h_y*w
tate = w_x*h
ans = w*h/2 - min(tate, yoko)
flag = 0
if tate == yoko:
    flag = 1
print(ans, flag)
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

sMM = max(sx, sy)

same = 0
if sx > sy:
    if sx % W == 0 or W-x != x-0:
        same = 1
if sy > sx:
    if sy % H == 0 or H-y != y-0:
        same = 1
if sx == sy:
    same = 1

print(sMM, same)
w,h,x,y=map(int,input().split())
p=w*h/2
a=1 if w*y==x*h or x*h+y*w==w*h else 0
print(p,a)
W, H, x, y = map(int, input().split())
S = W*H/2
if W//2 == x and H//2 == y:
    print(S, 1)
else:
    print(S, 0)
w,h,x,y=map(int,input().split())
print(w*h/2,1if 2*w==x and 2*h==y else 0)
W,H,X,Y = map(int, input().split())
C = X/W
D = Y/H
result2 = 0
result = 0
if C == 0 and D == 0:
    result = W*H*0.5
elif C == 0:
    result = D*W*H
elif D == 0:
    result = C*W*H
else:
    result = min(C,D)*W*H

if X != 0 and Y != 0:
    if X == Y:
        result2 = 1

print(result,result2)
h,w,x,y=map(int,input().split())
print(h*w/2, int((2*x==w)*(y*2==h)))
w,h,x,y=map(int,input().split())

if x==w or x==0:
    if y==h or y==0:
        print(0,"1")
else:
    w2=int(w//2)
    h2=int(h//2)

    s1=h*w2
    s2=w*h2
    if s1>s2:
        print(s1,"0")
    elif s1==s2:
        print(s1,"1")
    else:
        print(s2,"0")
W, H, x, y = map(int, input().split())

# 大きくない方とかって書いてあるけど、別にイコールの場合でもいいんかい！
# 中心の座標を求める
centerX = (W // 2)
centerY = (H // 2)

if ((x, y) == (centerX, centerY)):
    print((W * H) / 2, 1)

else:
    print(W * H / 2, 0)
w,h,x,y = map(int, input().split())
s = (w*h)/2
if(x == int(w/2) and y == int(h/2)):
    g = 1
else:
    g = 0
print(s,g)
W,H,x,y=map(int,input().split())
xx = min(W-x,x)
yy = min(H-y,y)
A1 = H*xx
A2 = W*yy
res = max(A1,A2)
if A1 == A2:
  print(res,1)
else:
  print(res,0)
W,H,x,y=map(int,input().split())
S = H*W/2
res = 0
if x*2 == W or y*2 == H:
  res = 1
print(S,res)
W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if x == y and W ==H else 0)
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    W, H, x, y = list(map(float, sys.stdin.buffer.readline().split()))
    ret = (W * H) / 2
    p = x == W//2 and y == H//2
    print(ret, 1 if p else 0)


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

ans2=0
if ((W%2==0)*W//2==X)*(X>0) and ((H%2==0)*H//2==Y)*(Y>0):
    ans2=1

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

print(ans1,ans2)
import sys
sys.setrecursionlimit(10**6)

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

area = max(min(w*y, w*(h-y)), min(x*h, (w-x)*h))
is_multi = 0

if area in [w*y, w*(h-y)] and x == w//2:
    is_multi = 1
elif area in [x*h, (w-x)*h] and y == h//2:
    is_multi = 1
    
print(area, is_multi)
w,h,x,y = map(int, input().split())

if x == w//2 and y == h//2: print(w*h/2, 1)
elif (x==0 and y==h) or (x==0 and y == 0) or(x==w and x==h) or (x==w and y == 0):
    print(w*h/2, 0)
else:
    if x >= w/2: a = (w-x) * h
    else: a = x * h
    if y >= h/2: b = (h-y) * w
    else: b = y * w
    print(max(a,b), 0)
w,h,x,y=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,w,h = map(int, input().split())
ans =0
if w*H+h*W ==W*H:
    ans =1
elif H*w==h*W:
    ans =1
    
print(str(W*H/2)+' '+ str(ans))
h,w,x,y=map(int,input().split())
print(h*w/2, int((2*x==w) and (y*2==h)))
a,b,c,d=map(int,input().split())
x=1
if a/2==c and b%2 or b/2==d and a%2:
  x=0
s=str((a*b)/2)+" "+str(x)
print(s)
W, H, x, y = map(int, input().split())
print(W*H//2, int(2*x == W and 2*y == H))
w,h,x,y=map(int,input().split())


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

big = max(w,h) * (min(w,h)/2)

if min(w,h)/2 == x and min(w,h)/2 == y:
    print(big)
    print(1)
elif x == 0 and x == 0 or x == w and x == 0 or x == w and x == h or x == 0 or x == h:
    print(w*h)
    print(1)
else:
    print(big)
    print(0)
w,h,x,y = map(int,input().split())
sy = []
sx = []
sy.append((h-y)*w)
sy.append(y*w)
sx.append((w-x)*h)
sx.append(x*h)
sx_min = min(sx)
sy_min = min(sy)
if sx_min == sy_min:
    print(sx_min, 1)
else:
    print(max(sx_min,sy_min),0)
W,H,x,y=map(int,input().split())
area=0
if abs(H//2-y)>abs(W//2-x):
    area=H*(min(x,W-x))
else:
    area=W*min(y,H-y)
ans=0
if W/2==x and H/2==y:
    ans=1
else:
    ans=0
print(area,ans)
w,h,x,y = map(int,input().split())

left = x * h
right = (w - x)*h
tatemin = min(left,right)

under = w * y
top = w * (h - y)
yokomin = min(under,top)

bigger = max(tatemin,yokomin)

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

print(ma,boo)
w,h,x,y = map(int,input().split())
flg = 0
if x * 2 == w :
    flg +=1
if y * 2 == h :
    flg +=1

if x * h == w * y :
    flg += 1


ans = max(w * y, h*x)

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

print('{:.9f}'.format(W*H/2), can)
w,h,x,y=map(int,input().split())

if x==w or x==0:
    if y==h or y==0:
        print(0,"1")
else:
    w2=w//2
    h2=h//2

    s1=int(h*w2)
    s2=int(w*h2)
    if s1>s2:
        print(s1,"0")
    elif s1==s2:
        print(s1,"1")
    else:
        print(s2,"0")
W,H,x,y=map(int,open(0).read().split())
all=W*H
if W//2 ==x and H//2==y:
    print(all/2,1)
else:
    print(max(W*y,H*x),0)
w, h, x, y = map(int, input().split())

are_w = min(w*y, w*(h-y))
are_h = min(x*h, (w-x)*h)

ans_are = max(are_w, are_h)
ans = 0
if are_w == are_h:
    ans = 1

if x == w and y == h:
    ans_are = w*h/2
    ans = 0

if x == 0 and y == 0:
    ans_are = w*h/2
    ans = 0

if x == 0 and y == h:
    ans_are = w*h/2
    ans = 0

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

ans = min(x*H, (W-x)*H, y*W, (W-y)*W)
if ans % W and ans % H:
    print(ans,0)
else:
    print(ans,1)
# 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)
if x==0:
    print((H-y)*W,0)
if y==0:
    print((W-x)*H,0)
W,H,x,y=map(int,input().split())

tall1=x*H
tall2=(W-x)*H

wide1=y*W
wide2=(H-y)*W

if 2*x==W and 2*y==H:
    print(x*H,1)
else:
    if tall1>tall2:
        t=tall2
    else:
        t=tall1
    if wide1>wide2:
        w=wide2
    else:
        w=wide1
    if w<t:
        print(t,0)
    else:
        print(w,0)
import sys
W,H,x,y = map(int, input().split())

ans = W * H // 2

if W / 2 == x and H / 2 == y:
  print("{} {}".format(ans, 1))
else:
  print("{} {}".format(ans, 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())
S = (W*H)/2
if x == W//2 and y == H//2:
    print(S,1)
else:
    print(S,0)
w, h, x, y = map(int,input().split())
sq1 = w*(h-y)
sq2 = w*y
sq3 = (w-x)*h
sq4 = x*h
sq12 = min(sq1,sq2)
if(sq1==0 or sq2==0):
  sq12 = max(sq1,sq2)
sq34 = min(sq3,sq4)
if(sq3==0 or sq4==0):
  sq34 = max(sq3,sq3)
jd = 0
if (sq12 == sq34):
  jd = 1
print(str(max(sq12,sq34))+" "+str(jd))
W, H, x, y = map(int,input().split())

print("{0} {1}".format(W*H/2, (int)(x==W//2 and y==H//2)))
w, h , x, y = map(int, input().split())

if w != h:

    num_split = 0

    if  x > y:

        maxarea_small = w * y

    else:
        
        maxarea_small = h * x

else:

    if  x > y:
        num_split = 0
        maxarea_small = w * y

    elif x < y:
        num_split = 0
        maxarea_small = h * x

    else:
        num_split = 1
        maxarea_small = x * h


print(maxarea_small, num_split)
w,h,x,y=map(int,input().split())
ans1=w*h/2

if w//2==x and h//2==y:
    ans2=1
else:
    ans2=0
print('{} {}'.format(ans1,ans2))
w,h,x,y=map(int,input().split())
print(str(w*h//2)+' '+str(1*(w==2*x and h==2*y)))
W,H,x,y = map(float,input().split(" "))

WH = W*H

w = (W-x)*H
h = (H-y)*W

if (WH-w)<w:
    w = (WH-w)
if (WH-h)<h:
    h = (WH-h)

if w>h:
    print("{} ".format(w),end="")
else:
    print("{} ".format(h),end="")
if W==h:
    print("1")
W, H, x, y = map(int, input().split())
FLAG = 0

if (W//2 == x and H//2 == y):
    FLAG = 1

answer = (W / 2) * H
print(answer, FLAG)
W, H, x, y = map(int, input().split())
area1 = W*y
area2 = H*x
print(area1 if area1 < area2 else area2, end='')
print(' 1' if W == H else ' 0')
def solve():
    A = list(map(int, input().split()))
    s = A[0] * A[1] / 2
    b = 1 if A[0] // 2 == A[2] and A[1] // 2 == A[3] else 0
    ans = [s, b]
    print(*ans)

# print(solve())

# def solve()が@return voidのとき
solve()
W,H,x,y = map(int, input().split())


if (x == int(W/2)) and (y == int(H/2)):
    print((W*H)/2,"1")
else:
    print((W*H)/2,"0")
W, H, x, y = map(int, input().split())
print(W * H / 2, end=" ")
print(0) if(x != W // 2 and y != H // 2) else print(1)
W, H, x, y = list(map(int,input().rstrip().split()))
if x*2 == W and y*2 == H:
    print(W*H//2, 1)
else:
    print(W*H//2, 0)
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    W,H,x,y = mi()

    ans = '{:.10f}'.format(W*H/2)
    ans2 = 1 if x==W/2 and y==W/2 else 0
    print(ans,ans2)
    




if __name__ == "__main__":
    main()
def main():
    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)


if __name__ == "__main__":
    main()
w, h, x, y = map(int, input().split())
ans1 = w*h/2
if x == w//2 and y == h//2:
    print(ans1, 1)
else:
    print(ans1, 0)
w,h,x,y=[int(x) for x in input().rstrip().split()]

dou=0
if w//2==x and h//2==y:
  dou=1

print(w*h/2,dou)
W, H, x, y = map(int, input().split())

#正方形なら複数　これも面積半分?
#長方形なら一つ 点対称の線を引けば面積半分にできる

if W == H:
    print(W*H//2, 1)
else:
    print(W*H//2, 0)
W,H,x,y = list(map(int,input().split()))
if W//2 == x and H//2 == y:
    print(str(W*H/2)+' '+'1')
else:
    print(str(W*H/2)+' '+'0')
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    WH = W * H
    X = min(H * x, WH - H * x)
    Y = min(W * y, WH - W * y)
    cnt = (1 if X == Y else 0)

    print(min(X, Y), cnt)


if __name__ == "__main__":
    main()
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)
a,b,c,d=map(int,input().split())
x=1
if a%2==0 and a/2==c or b%2==0 and b/2==d:
  if a/2==c and b/2==d:
    pass
  else:
    x=0
s=str((a*b)/2)+" "+str(x)
print(s)
w,h,x,y=map(int,input().split())
ans=w*h/2.000000000
a=0
if( ((x==0 or x==w)) or (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('{:.6f}'.format(ans),a)
w, h, x, y = [int(_) for _ in input().split()]

if w * y > h * x:
    if h / 2 == y:
        print(h * x, 1)
    else:
        print(h * x, 0)
elif w * y < h * x:
    if w / 2 == x:
        print(w * y, 1)
    else:
        print(w * y, 0)
else:
    print(h * x, 1)
w,h,x,y = map(int, input().split())
ans = 0
if w==h: ans += 1
if w%2==0: ans += 1
if h%2==0: ans += 1

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

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

A=H*min(x,W-x)
B=W*min(y,H-y)
if A==B:
    print(A,end=" ")
    print(1)
else:
    print(max(A,B),end=" ")
    print(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())
if W == H:
  if x == W/2 and y == H/2:
    can = 1
  else:
    can = 0
else:
  if x == W/2 or y == H/2:
    can = 0
  else:
    can = 1

print('{:.9f}'.format(W*H/2), can)
w, h, x, y = map(int, input().split())

s = w * h / 2
flg = 0

if (x == w // 2 and y == h // 2) and w % 2 == 0 and h % 2 == 0:
    print(w * h // 2, 1)
else:
    print(w * h // 2, 0)
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))
    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 = [int(s) for s in input().split(' ')]
S = W * H // 2
D = 1 if W / 2 == x and H / 2 == y else 0
print('%f %d' % (S, D))
def main():
    w, h, x, y = map(int, input().split())
    area = max(min(h * x, w * h - h * x), 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())
area1 = [x * H, (W - x) * H]
area2 = [W * y, W * (H - y)]
judge = 1
cnt = 0

if min(area1) > min(area2):
    ans = min(area1)
else:
    ans = min(area2)
    judge = 0


for i in range(len(area1)):
    if judge == 1:
        if ans == area2[i]:
            cnt = 1
    else:
        if ans == area1[i]:
            cnt = 1


print("{0} {1}".format(ans,cnt))
w, h, x, y = map(int, input().split())
mirx = min(x*h,(w-x)*h)
miry = min(w*y,w*(h-y))
if w == 2*x and h == 2*y:
    print(mirx, 1)
else:
    print(max(mirx, miry), 0)
W, H, x, y = map(int, input().split())

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

print(area, div)
#!/usr/bin/python3
# -*- coding:utf-8 -*-

def main():
  w, h, x, y = map(int, input().strip().split())
  print((w * h)/2, 1 if w//2 == x and h//2 == y else 0)
  pass

if __name__=='__main__':
  main()
W, H, x, y = map(int, input().split())
print(W*H//2, int(x == y == W/2))
import math
def main():
    t = [int(t)for t in input().split()]
    w,h,x,y = t[0],t[1],t[2],t[3]

    left,right = x, w-x
    top, bottom = y, h-y



    s_ = [left*h,right*h,top*w,bottom*w]
    s_ = sorted(s_)

    if s_[3]==0 and s_[0]==s_[1]:
        print(s_[1],0)
    else:
        print(s_[2],1 if s_[2]==s_[3] else 0)

if __name__ == "__main__":
    main()
import sys
w,h,x,y = map(float,input().split())
S = w*h/2
if x == w/2:
  if y == h/2:
    print([S,1])
    sys.exit()
print([S,0])
W , H , x , y = map(float,input().split())

area = ( W * H ) / 2

'''
b = (H -W + 2*x - 2*y ) / 2

if 0 <= H + x -y -b and H + x - y - b <= H and 0 <= x - y - b and x - y - b <= H:
    if 0 <= W - x + y + b and W -x + y + b <= W and 0 <= y - x + b and y - x + b <= W:
        print(area,1)
    else:
        print(area,0)
else:
    print(area,0)
'''

if W == H :
    print(area,1)
else:
    print(area,0)
def main():
    W, H, x, y = map(int, input().split())

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


if __name__ == '__main__':
    main()
W, H, x, y = map(int, input().split())
area1 = min(x * H, (W - x) * H)
area2 = min(W * y, W * (H - y))
print(min(area1, area2), 1 if area1 == area2 else 0)
W, H, X, Y = map(int, input().split())

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

a3 = X * H
a4 = (W-X) * H
if a3==0 or a4==0:
    a34 = max(a3, a4)
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())
if x==w/2 or y==h/2:
    print(w*h/2,1)
else:
    print(w*h/2,0)
W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if x == y and W ==H or W*y==H*x else 0)
w,h,x,y=map(int,input().strip().split())
print(w*h/2,1*((x*2==w)==(y*2==h)))
W,H,x,y = map(int,input().split())

S = W * H * 0.5

if(x == W//2 and y == H//2):
    a = 1
else:
    a = 0

print(S,a)
w, h, x, y = list(map(int, input().split()))
# x = aで分割して場合
s_x = min((w - x) * h, x * h)
# y = bで分割した場合
s_y = min((h - y) * w, y * w)
if (s_x == s_y) or (x == w/2) or (y == h/2):
    print(str(s_x) + " " + str(1))
else:
    print(str(max(s_x, s_y)) + " " + str(0))
w, h, x, y = map(int, input().split())

if w - x > x:
    s1 = x * h
else:
    s1 = (w - x) * h

if h - y > y:
    s2 = y * w
else:
    s2 = (h - y) * w

if s1 > s2:
    print('{:.6f}'.format(s1), 0)
elif s1 == s2:
    print('{:.6f}'.format(s1), 1)
else:
    print('{:.6f}'.format(s2), 0)
w,h,x,y = map(int,input().split())
if (int(w/2) == x) and (int(h/2) == y ):
  print(w*h/2,1)
else:
  print(w*h/2,0)
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    w, h, x, y = MI()
    s_x = h*min(x, w-x)
    s_y = min(y, h-y)*w
    print("{} {}".format(max(s_x, s_y), int(s_x==s_y)))
if __name__ == '__main__':
    main()
W, H, X, Y = map(int, input().split())

ans1 = (W*H)/2
# if X==W//2 and Y==H//2:
if W==H*2 and H==Y*2:
    ans2 = 1
else:
    ans2 = 0
print(ans1, ans2)
w, h, x, y = map(int, input().split())
s1 = (w - x) * h
s2 = w * h - s1
s3 = w * (h - y)
s4 = w * h - s3

res1 = min(s1, s2)
res2 = min(s3, s4)

if res1 != res2:
    print(max(res1, res2), 0)
else:
    print(res1, 1)
W, H, x, y = map(int, input().split())

# x軸で切る
s1 = (x - 0) * H
s2 = (W - x) * H
sx = min(s1, s2)

# y軸で切る
s3 = W * (y - 0)
s4 = W * (H - y)
sy = min(s3, s4)

if sx == sy:
    s = sx
    w = 1
else:
    s = max(sx, sy)
    w = 0

print(s, w)
W, H, x, y = map(int, input().split())
print(W+H//2, int(x == y == 0))
w,h,x,y=map(int,input().split())
gx=w//2
gy=h//2
s=(w*h)/2
if gx==x and gy==y:
	print(s,1)
else:
	print(s,0)
import itertools
import math
import fractions
import functools
import copy

w, h, x, y = map(int, input().split())
ans = 0
if x == w // 2 and y == h // 2:
    ans = 1

print(w*h/2,ans)
W, H, x, y = list(map(int, input().split()))
print(W * H / 2, int(W // 2 == x and H // 2 == y))
W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if (x==W//2 and y==H//2) else 0)
import sys
w,h,x,y=map(int,input().split())

if w==0 or h==0:
    print(0,1)
    sys.exit()

if x==w//2 and y==h//2:
    a=1
else:
    a=0
print(w*h/2,a)
w,h,x,y = map(int,input().split())
q = w*h
# 縦に分割
ans1_1 = h*x
ans1_2 = q - ans1_1
ans1 = ans1_1 if ans1_1 <= ans1_2 else ans1_2

# 横に分割
ans2_1 = w*y
ans2_2 = q - ans2_1
ans2 = ans2_1 if ans2_1 <= ans2_2 else ans2_2

if ans1 == ans2:
    print (ans1,1)
elif ans1 < ans2:
    print (ans2,0)
else:
    print (ans1,0)
h,w,x,y=map(int,input().split())
print(h*w/2, 1*(x==w/2)*(y==h/2))
w,h,x,y=map(int,input().split())
print((w*h)/2,(2*x==w)&(2*y==h))
W, H, x, y = list(map(int, input().split()))

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

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

are_w = min(w*y, w*(h-y))
are_h = min(x*h, (w-x)*h)

ans_are = max(are_w, are_h)
ans = 0
if are_w == are_h:
    ans = 1
if ans_are == are_w:
    if w == 2*x:
        ans = 1
if ans_are == are_h:
    if h == 2*y:
        ans = 1
        
print(ans_are, ans)
w,h,x,y=map(int,input().split())

r=[[] for ii in range(2)]
r[0]=sorted([x*h,(w-x)*h])
r[1]=sorted([y*w,(h-y)*w])
r.sort(reverse=True)
#print(r)
if r[0][0]==r[1][0]:
  n=1
else:
  n=0
print(r[0][0],n)
def main():
    W, H, x, y = map(int, input().split())

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

    print(W * H / 2, 1)


main()
import sys
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    W, H, x, y = readnums()
    ans = max(min(H * x, (W - x) * H), min(W * y, W * (H - y)))
    if min(H * x, (W - x) * H) == min(W * y, W * (H - y)):
        print(ans, 1)
    else:
        print(ans, 0)


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

ans_1 = min(W*y, W*(H-y))
ans_2 = min(x*H, (W-x)*H)

if ans_1 == ans_2:
    if ans_1 == 0:
        print(0, 0)
    else:
        print(ans_1, 1)
else:
    print(max(ans_1,ans_2), 0)
w,h,x,y = map(int,input().split())
ans = 0
if x*2==w or y*2==h:ans=1
print(w*h/2,ans)
coordinates = list(map(int, input().split()))
w = coordinates[0]
h = coordinates[1]
x = coordinates[2]
y = coordinates[3]
if x == w and y == h:
    x = y = 0
prod1 = x * h
prod2 = y * w
area = min(prod1, prod2)
area = format(area, '.6f') if area != 0 else 0
addit = 0 if prod1 != prod2  else 1
print("{} {}".format(area,addit))
w,h,x,y=map(int,input().split())
if x==w//2 and y==h//2:
  frag=1
else: frag=0
print(w*h/2,frag)
W, H, x, y = map(int, input().split())
s1 = [x*H, (W-x)*H]
s2 = [y*W, (H-y)*W]
ans = max(min(s1), min(s2))

if min(s1) == min(s2):
  print(ans, 1)
else:
  print(ans, 0)
W,H,x,y=map(int,input().split())

tall1=x*H
tall2=(W-x)*H

wide1=y*W
wide2=(H-y)*W

if tall1<tall2:
    t=tall1
else:
    t=tall2

if wide1<wide2:
    w=wide1
else:
    w=wide2

if w<t:
    print(t,0)
elif t<w:
    print(w,0)
else:
    print(t,1)