peterverebics/CodeNet_Python_118 huggingface dataset:
W, H, x, y = map(int, input().split())
if x < W / 2:
    A = x * H
else:
    A = (W - x) * H

if y < H / 2:
    B = y * W
else:
    B = (H - y) * W
print(min(A, B))
if A == B:
    print(1)
else:
    print(0)
w,h,x,y=list(map(int,input().split()))
if h==0:
  print(0,0)
else:
  if w//2==x and h//2==y:
    print(w*h/2,1)
  else:
    print(w*h/2,0)
W, H, x, y = map(int, input().split())
area = W * H

if x == 0 or x == W or y == 0 or y == H:
    print(area / 2.0, 0)
elif x == W / 2.0 and y == H / 2.0:
    print(area / 2.0, 1)
elif y / x == H / W or (H - y) / x == H / W:
    print(area / 2.0, 0)
else:
    print(area / 2.0, 1)
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 or H-y == y 
print(max_value, 1 if flg else 0)
w,h,x,y = map(int, input().split())

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

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

if area1 == area2:
    print(max(area1, area2), 1)
else:
    print(max(area1, area2), 0)
def main():
    w, h, x, y = map(int, input().split())


    ans = w * h / 2
    hasDivision = x + x == w and y + y == h

    print(ans, hasDivision)

if __name__ == '__main__':
    main()
import math
import collections
from operator import mul
from functools import reduce

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

if W/2==x:
    flag+=1
if H/2==y:
    flag+=1

print((W*H)/2,flag)
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=list(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
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 W==H else 0
    print(ans,ans2)
    




if __name__ == "__main__":
    main()
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    W, H, x, y = map(int, input().split())
    X, Y = min(x, W-x) * H, min(y, H-y) * W
    print(max(X, Y), int(X > 0 and X == Y))

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)
else:
  print(w*h/2, 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==H and x==y:
    print(1)
  else:
    print(0)
  return 
main()
a,b,x,y = map(int,input().split())
print(a*b/2,x*2==a and y*2==b)
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:
    print(str(s_x) + " " + str(1))
else:
    print(str(max(s_x, s_y)) + " " + str(0))
A, B, C, D = map(int, input().split())
S = A*B/2
#if A%2==1 and B%2==1:
  #S += 0.5

ans = 0
if C == A//2 and D == B//2:
  ans = 1
print(S,ans)
w, h, x, y = map(int, input().split())
s1 = min(x, w - x) * h
s2 = min(y, h - y) * w
s = max(s1, s2)
c = 0
if s == s1 and y == h / 2:
    c = 1
elif s == s2 and x == w / 2:
    c = 1
print('{:.6f}'.format(s), c)
w,h,x,y=map(int, input().split())
#S= w*h/2
ans = 1 if (x+x==w & y+y==h) else 0
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=input().split()
w=int(w)
h=int(h)
x=int(x)
y=int(y)
d1=w*(h-y)
d2=w*y
d3=h*(w-x)
d4=h*x
if d1==d2 and d3==d4:
    print(float(d1),1)
    exit()
if d1==d2:
    print(float(d1),0)
    exit()
if d3==d4:
    print(float(d3),0)
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    w, h, x, y = map(int, input().split())
    ans = 0
    if x*h == y*w:
        ans = 1
    print(float(min(x*h, y*w)), ans)
    
if __name__ == '__main__':
    main()
w,h,x,y = map(int, input().split())

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

print('{:.7f}'.format(ans*w*h), end=" ")
#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())

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 = map(int, input().split())

a = x*h
b = (w-x)*h

abmin = min(a,b)

c = y * w
d = (h-y) * w

cdmin = min(c, d)

ans = max(abmin, cdmin)

judge = 0
lis1 = sorted([a,b])
lis2 = sorted([c,d])

if lis1 == lis2:
    judge = 1


print(ans, judge)
# https://atcoder.jp/contests/abc130/tasks/abc130_c

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

ans = w * h / 2

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

print(ans, flag)
a,b,c,d=map(int,input().split())

print(a*b/2)
w, h, x, y = [int(i) for i in input().split()]
print(w * h // 2, 1 if x == w // 2 and y == h // 2 else 0)
r=input().split()
W=int(r[0])
H=int(r[1])
x=int(r[2])
y=int(r[3])
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(str(W*H/2)+" 0")
else:
    ans_1=min(H*x,H*(W-x))
    ans_2=min(W*y,W*(H-y))
    if ans_1==ans_2:
        print(str(ans_1)+" 1")
    else:
        print(str(max(ans_1,ans_2))+" 0")
W, H, x, y = [int(i) for i in input().split()]

mx = min(W - x, x)
my = min(H - y, y)

sx = mx * H
sy = my * W
s = max(sx, sy)
a = 1 if sx == sy else 0
print(s, a)
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())

t = (w*h)/2

a = x*h
b = (w-x)*h

abmin = min(a,b)

c = y * w
d = (h-y) * w

cdmin = min(c, d)

ans = max(abmin, cdmin,t)

judge = 0
lis1 = sorted([a,b])
lis2 = sorted([c,d])

if lis1 == lis2:
    judge = 1

if ans == t:
    judge = 0

print(ans, judge)
w, h, x, y = list(map(int,input().split()))

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

max_area = w*h/2

split = 0
if x==w//2:
    if y==h//2:
        split = 1

print('{} {}'.format(max_area, split))
w, h ,x, y=map(int, input().split())
m1=min((w-x)*h, x*h)
m2=min((h-y)*w, y*w)

ans=max(m1, m2)

if m1 == m2:
    p=1
else:
    p=0

print(ans, p)
w,h,x,y=map(int,input().split())
sx=min(x*h,h*(w-x))
sy=min(y*w,w*(h-y))
if sx==sy:
	print(sx,"1")
else:
	print(max(sx,sx),"0")
W, H, x, y = map(float, input().split())
print((W * H) / 2, end=" ")
print(0) if(x != W / 2 and y != H / 2) else print(1)
W, H, x, y = map(int, input().split())

WS = min(x, W - x) * H
HS = min(y, H - y) * W

ans1 = max(WS, HS)

ans2 = 0
if x * 2 == W and y * 2 == H:
    ans2 = 1

print(ans1, ans2)
W,H,x,y = map(int,input().split())
all = W * H
a = min(x*H,(W-x)*H)
b = min(y*W,(H-y)*W)

if x == W//2 and y == H//2:
    print(all/2,1)
else:
    print(max(a,b),0)
w, h, x, y = list(map(int, input().split()))
#b = list(map(int, input().split()))
if (x == 0 and y == 0) or (x == w and y == h):
    print(w*h/2, end=" ")
    print(1)
    exit()

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(1)
else:
    print(0)
w,h,x,y = map(int,input().split())
if x ==w//2 and y ==h//2:
    print(h*w//2,1)
else:
    print(h*w/2,0)
import sys

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


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

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

    area2 = INF + 1
    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())
xwari = min(X*H,(W-X)*H)
ywari = min(Y*W,(H-Y)*W)
if W//2 == X and H//2 == Y:
    f = 1
else:
    f = 0
print(W*H/2, f)
W,H,x,y=map(int,input().split())
if x==W//2 and y==H//2:
  print(W*H/2,1)
elif x==W//2 and y!=H//2:
  print(W*H/2,0)
elif x!=W//2 and y==H//2:
  print(W*H/2,0)
else:
  print(W*H/2,1)
w, h, x, y = [int(_) for _ in input().split()]

if w * y > h * x:
    print(h * x)
    if h / 2 == y:
        print(1)
    else:
        print(0)
elif w * y < h * x:
    print(w * y)
    if w / 2 == x:
        print(1)
    else:
        print(0)
else:
    print(h * x)
    print(1)
def main():
  import fractions
  
  w,h,x,y=map(int,input().split())
  if w==h:
    print(w*h/2,1)
  else:
    print(w*h/2,0)
    
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)
W,H,x,y = map(int,input().split())
S = W*H
s1 = x*H
s2 = y*W
d1 = abs(s1-S//2)
d2 = abs(s2-S//2)
if d1 == d2:
    cnt = 1
else :
    cnt = 0
    
if d1<=d2:
    print(s1,cnt)
elif d1>d2:
    print(s2,cnt)
w,h,x,y = [int(x) for x in input().split()]

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

# 面積の半分
area_half = W * (H / 2)
# 点 x,y が中心なら分割方法は複数
if x == W//2 and y == H//2:
  print(area_half, 1)
else:
  print(area_half, 0)
w, h, x, y = map(int, input().split())

a = x * h if x > w / 2 else (w - x) * h
b = w * y if y > h / 2 else (h - y) * w

if a > b:
    print(a, 0)
elif b < a:
    print(b, 0)
else:
    print(a, 1)
W,H,x,y=map(int,input().split())

print(W*H/2,0)
w,h,x,y=list(map(int,input().split()))
if (w//2==x and h//2==y) or w==h:
  print(w*h/2,1)
else:
  print(w*h/2,0)
w, h, x, y = [int(i) for i in input().split()]
print(w * h / 2, int(x != (w / 2) and y != (h / 2)))
def main():
  import fractions
  
  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)
  
if __name__=="__main__":
  main()
def main():
    w,h,x,y = map(int,input().split())
    flg = 0
    if x == 0 or y == 0:
        print(0,0)
        return
    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)


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

area = W*H/2
center_x = W//2
center_y = H//2

if center_x == x and center_y == y:
    print(area, 1)
else:
    print(area, 0)
w,h,x,y = map(int,input().split())
 
 
s = w*h
 
if (w-x)*h > (h-y)*w:
    print(float((w-x))*h,end = " ")
    print(0)
elif (w-x)*h == (h-y)*w:
    print(float((w-x))*h,end = " ")
    print(1)
else:
    print(float((h-y))*w,end = " ")
    print(0)
W, H, x, y = map(float,input().split())

#長方形の重心を求める
gx = W / 2.0
gy = H / 2.0

# x,yが重心と一致する場合は複数ある
split = 0

print(x,y,gx,gy)
if x == gx and y == gy:
    split = 1

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

area = min(x, w - x) * h

if x == y == 0 or (x == w and y == h) or w == h:
    print(area, 1)
else:
    print(area, 0)
#!/usr/bin/env python
# coding: utf-8

# In[5]:


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


# In[6]:


s = W*H//2
if x == W/2 and y == H/2:
    p = 1
else:
    p = 0
print(s,p)


# In[ ]:
w,h,x,y = map(int,input().split())

if w==x/2 and h==y/2 :
      print(w*h/2,1)
else:
      print(w*h/2,0)
W,H,x,y = map(int, input().split())
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, input().split())
men = W * H / 2
judge = 0
if x == W // 2 and y == H // 2:
  judge = 1
print("{} {}".format(men, judge))
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

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

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

s = w*h

if (w-x)*h > (h-y)*w:
    print(s-w*y)
    print(0)
elif (w-x)*h == (h-y)*w:
    print(s-w*y,end = " ")
    print(1)
else:
    print(s-x*h,end = " ")
    print(0)
w, h, x, y = map(int, input().split())
print(float(w) * float(h) / 2, 1 if w == x + x & h == y + y else 0)
w, h, x, y = map(int, input().split())

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(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(horizontal), 1)
W,H,x,y = map(int,input().split())
ans = W * H / 2
if W // 2 == x and H // 2 == y:
    flg = 1
else:
    flg = 0
print(ans,flg)
import os, sys, re, math, queue

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

ret = W * H
mul = 0

ret1 = min(H*x, H*(W-x))
ret2 = min(W*y, W*(H-y))

if ret1 != ret2:
	print(max(ret1,ret2), 0)
else:
	print(ret1, 1)
#!/usr/bin/env python3
import collections as cl
import sys


def II():
    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()
    x_ratio = x / W
    y_ratio = y / H

    min_ratio = min(x_ratio, y_ratio)

    min_menseki = min_ratio * W * H

    is_same_ratio = 1 if x_ratio == y_ratio else 0

    print(min_menseki, is_same_ratio)


main()
# -*- coding: utf-8 -*-

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

print(w*h/2, 1 if w/2==x else 0)
w,h,x,y = map(int,input().split())
print(w*h/2, end=' ')
if x==w//2 and y==h//2:
    print(1)
else:
    print(0)
w,h, x,y = map(int,input().split())
a = 0
b = 0
a = (w)*(h-y)
b = (w)*y
ans = 0
ans = min(a,b)

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

if ans<ans2:
    print(ans2, 0, sep=" ")
elif ans2<ans:
    print(ans, 0, sep=" ")
else:
    print(ans, 1, sep=" ")
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)
W,H,x,y = map(int,input().split())
print(W*H)
W, H, x, y = map(int, input().split())
print(W*H/2, 1 if x==W//2 & y==H//2 else 0)
W,H,x,y = map(int,input().split())
half = W * H / 2
print(half)
hasMulti = True
if x == 0 or x == W or y == 0 or y == H:
  hasMulti= False
if hasMulti:
  print(1)
else:
  print(0)
exit()
w, h, x, y = map(int, input().split())

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

S = W*H//2

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

tmp = 0
tmp1 = min((W - x) * H, x * H)
tmp2 = min(W * (H - y), W * y)

if tmp1 == tmp2:
    print(tmp1, 1)
elif tmp1 > tmp2:
    print(tmp1, 0)
else:
    print(tmp2, 0)
W,H,x,y = map(int,input().split())
is_center = 0
if x == W//2 and y == H//2:
    is_center = 1
print((W*H)/2,is_center)
W, H, x, y = map(int, input().split())

ans = W * H / 2
if W//2 == x and H//2 == y:
    print(ans, 1)
else:
    print(ans, 0)
w,h,x,y=map(int,input().split());S1=(w-x)*h;S2=(h-y)*w;print(max(S1,S2),sum([S1==S2]))
W, H, x, y = map(int, input().split())
a = []
a.append(min(H*W-min(x, y)*H, min(x, y)*H))

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


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

print('{:.6f}'.format(ans*w*h), end=" ")
#print(ans*w*h, end=" ")
if min(x/w, (w-x)/w)==min(y/h,(h-y)/h):
	print(1)
else:
	print(0)
import sys
input=sys.stdin.readline
w,h,x,y=map(int,input().split())
cnt=w*h
if w*y!=h*x:
    print(min(cnt-w*y,cnt-h*x),0)
else:print(min(cnt-w*y,cnt-h*x),1)
w, h, x, y = map(int, input().split())

area = min(x, w - x) * h

if w == h:
    print(area, 1)
else:
    print(area, 0)
from decimal import Decimal
W, H, x, y = map(int, input().split())
Wi = W * 10 ** 9
Hi = H * 10 ** 9
men = Decimal(W * H / 2)
judge = 0
if x == W // 2 and y == H // 2:
  judge = 1
print("{0:.10f} {1:.0f}".format(men, judge))
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), 1)
w, h, x, y = [int(i) for i in input().split()]
print(min(w * y, h * x), int(w * x == h * y))
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:
    if s == w*h / 2:
        print(s, '1')
    else:
        print(s, '0')
import math
import collections
from operator import mul
from functools import reduce

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

if W/2==x:
    flag+=1
if H/2==y:
    flag+=1

print("{0:.6f}".format(float(W*H/2)),flag)
def main():
    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 ans * 2 > w*h:
        ans = min(w*y,h*x)

    if flg == 1:
        print(w*h/2, 0)
    elif flg > 1:
        print(w*h/2, 1)
    else:
        print(ans, 0)


if __name__ == '__main__':
    main()
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(max(min(y, h - y) * w, min(x, w - x) * h), 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))
    if 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())
s1 = min(w-x, x)*h
s2 = min(h-y, y)*w
print(max(s1, s2), 1 if s1 == s2 else 0)
w,h,x,y=map(int,input().split())
flag=0
if w%2==0 or h%2==0:
  if x == w //2 and y == h // 2:
    flag = 1
s=0
for i in range(h):
  s += w
print(s/2,flag)
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('{:.10f}'.format(ans*w*h), end=" ")
#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 = min((w-x)*h, x*h)
s2 = min(w*y, w*(h-y))

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

area_x1 = x * H
area_x2 = (W-x) * H
area_x = min(area_x1, area_x2)
area_y1 = W * y
area_y2 = W * (H-y)
area_y = min(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)
#C - Rectangle Cutting
W,H,x,y = map(float,input().split())
def main(W,H,x,y):
    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())

P = 0
if h > w:
    ans = min(x*h, (w-x)*h)

elif h == w:
    if x != 0 and y != 0:
        P = 1
    ans = max(min(x * h, (w - x) * h), min(y * w, (h - y) * w))

else:
    ans = min(y * w, (h - y) * w)

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

ans = max(x*h,y,w)
ans0 = (1 if x*h==y*w else 0)
print(ans,ans0)
def rectangle_cutting(w, h, x, y):

    a = 0
    ans = min((w-x)*h, x*h)

    if ans == min((h-y)*w, w*y):
        a = 1
    else:
        ans = max(ans, min((h-y)*w, w*y))

    return str(ans)+" "+ str(a)
def main():
    w, h, x, y = map(int, input().split())
    print(rectangle_cutting(w, h, x, y))

if __name__ == '__main__':
    main()
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=0
for val in arry:
  if ans==val:
    cnt+=1
for val in arrx:
  if ans==val:
    cnt+=1
print(str(ans)+" "+("0" if cnt==1 else "1"))
w,h,x,y=map(int,input().split())
a=min(x*h,h*w-x*h)
b=min(y*w,h*w-y*w)

if 2*y==h and 2*x==w:
    print(max(a,b),1)
else:
    print(max(a,b),0)
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(ans, flag)
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(float(ans), method)
W, H, x, y = map(int, input().split())

# 面積の半分
area_half = W * H / 2
# 点 x,y が中心なら分割方法は複数
if x == W//2 and y == H//2:
  print(area_half, 1)
else:
  print(area_half, 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), 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')
import sys
import os


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

    W, H, x, y = list(map(int, sys.stdin.buffer.readline().split()))
    P = 0

    Py = (abs(W-x)) * H
    Px = (abs(H-y)) * W
    ret = max(Py, Px)
    P = 1 if Py == Px else 0
    print(ret, P)

if __name__ == '__main__':
    main()
coordinates = list(map(int, input().split()))
w = coordinates[0]
h = coordinates[1]
x = coordinates[2]
y = coordinates[3]
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 w//2==x and h//2==y:
  print(str((h*w//2))+' '+str(1))
  
else:
  print(str((h*w//2))+' '+str(0))
W, H, x, y = map(int, input().split())

if W==x*2 and H==y*2:
    print(W*H/2, 1)
else:
    print(max(min(x,W-x)*H, min(y, H-y)*W), 0)
X, H, x, y = [int(x) for x in input().split()]

if X * y > H * x:
    print(H * x, 0)
elif X * y < H * x: 
    print(X * y, 0)
else:
    print(X * y, 1)
w,h,x,y=map(int,input().split())
print((w*h)/2 , 1) if x==w//2 and y==h//2 else print((w*h)/2,0)
W,H,x,y = map(int,input().split(" "))
if x == W/2 and y == W/2:
    ans = 1
else:
    ans = 0
print(str(H*W/2) + ' ' + str(ans))
w,h,x,y=map(int, input().split())
S= w*h/2
ans = 1 if (x+x==w & y+y==h) else 0
print(S, ans)
def intMap(): return map(int,input().split())

w,h,x,y = intMap()

s = w * h / 2
multi = 0
if (x == w // 2) and (y == h // 2):
    multi = 1

print("{:.10f} {}".format(s,multi))
W,H,x,y=map(int,input().split())
if x==W//2 and y==H//2:
	c=1
else:
	c=0
print(W*H/2,c)
w, h, x, y = [int(i) for i in input().split()]

s_0 = min(x * h, (w - x) * h)
s_1 = min(w * y, w * (h - y))

print(max(s_0, s_1), 1 if s_0 == s_1 else 0)
whxy=list(map(int,input().split()))
if whxy[2]==whxy[0]//2 and whxy[3]==whxy[1]//2:
  print(whxy[2]*whxy[3]*2,1)
else:
  print(whxy[0]*whxy[1]//2,0)
def resolve():
    '''
    code here
    '''
    W, H, x, y = [int(item) for item in input().split()]

    if x == W//2 and y == H//2:
        res = 1
    else:
        res = 0

    print(W*H/2, res)


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

ans = 0
if x*H == W*y:
    ans = 1
S = min(x*H, W*y)
print(S, ans)
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

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

if W/2==x and H/2==y:
    print(max(x*H, y*W), 1)
else:
    print(max(min(x,W-x)*H, min(y, H-y)*W), 0)