Problem:
 Score : 300 points    Problem Statement There is a rectangle in a coordinate plane. The coordinates of the four vertices are (0,0) , (W,0) , (W,H) , and (0,H) .
You are given a point (x,y) which is within the rectangle or on its border. We will draw a straight line passing through (x,y) to cut the rectangle into two parts. Find the maximum possible area of the part whose area is not larger than that of the other. Additionally, determine if there are multiple ways to cut the rectangle and achieve that maximum.      Constraints  1 \leq W,H \leq 10^9  0\leq x\leq W  0\leq y\leq H  All values in input are integers.         Input Input is given from Standard Input in the following format:  W  H  x  y       Output Print the maximum possible area of the part whose area is not larger than that of the other, followed by 1 if there are multiple ways to cut the rectangle and achieve that maximum, and 0 otherwise.  The area printed will be judged correct when its absolute or relative error is at most 10^{-9} .        Sample Input 1 2 3 1 2      Sample Output 1 3.000000 0  The line x=1 gives the optimal cut, and no other line does.       Sample Input 2 2 2 1 1      Sample Output 2 2.000000 1

Solution (Python):
w,h,x,y = map(int, input().split())
print('{:.9f} {}'.format(w*h/2, 1 if x+x==w and y+y==h else 0))

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

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

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

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

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

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

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

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





gx = W / 2
gy = H / 2




is_multi = 1 if (x, y) == (gx, gy) else 0

print(str(W * H / 2) + " " + str(is_multi))

Solution (Python):
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)

Solution (Python):
w,h,x,y = map(int, input().split())
out1 = w * h / 2
out2 = 1 if x == w/2 and y == h/2 else 0
print("{0} {1}".format(str(out1), str(out2)))

Solution (Python):
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)

Solution (Python):
w,h,x,y = (int(i) for i in input().split())
if (w/2,h/2) == (x,y):
    print(h*w/2,1)
else:
    print(h*w/2,0)

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

Solution (Python):
W, H, x, y = map(int, input().split())
bigarea = W * H

j = (bigarea/2.000000)


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

print(j, k)

Solution (Python):

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

a = 0

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

print(W*H/2, a)

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

if (x * 2 == W and y * 2 == H):
    res = '1'
else:
    res = '0'

area = W * H / 2

print('{} {}'.format(area, res))

Solution (Python):

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

if (W==0)or(H==0):
    print(float(0))
    print(1)
else:
    if (W/2==float(x))&(H/2==float(y)):
        print(H*W/2)
        print(1)
    else:
        print(H*W/2)
        print(0)

Solution (Python):
w,h,x,y = list(map(int,input().split()))
a = float(w/2)
b = float(h/2)
s = float(w*h/2)
if a==x and b==y:
  print(s,1)
else:
  print(s,0)

Solution (Python):
W, H, x, y = map(int, input().split())
bigarea = W * H

j = (bigarea/2.000000)



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



print('{:6f} {:}'.format(j,k))

Solution (Python):
import sys
input = sys.stdin.readline

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

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

ans = float(W * H / 2)
num = 0
if W == x * 2 and H == y * 2:
    num = 1
print("{:.6f} {}".format(ans, num))

Solution (Python):
W, H, x, y = map(float, input().split())

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

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


area = W * H / 2

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

print(area, is_multi)

Solution (Python):
a, b, x, y = map(int, input().split())
ans = float(a)*float(b) / 2.0
if(x + x == a and y + y == b):
    num = 1
else:
    num = 0

print(ans, num)

Solution (Python):
W,H,x,y = map(int,input().split())
WC = W/2
HC = H/2
flag = 0

if WC == x and HC == y:
    flag = 1

print(W*H/2,flag)

Solution (Python):
from decimal import *
import sys
W, H, x, y = map(int, input().split())
num = 0
if 2 * x == W and 2 * y == H:
    num = 1

print(W * H / 2, num)

Solution (Python):
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)

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

ans = W * H / 2
if x == W / 2 and y == H / 2:
    f = 1
else:
    f = 0

print(ans,f)

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

Solution (Python):
W, H, x, y = map(float, input().split())
sq = W * H
met = 0
if W/2 == x and H/2 == y:met=1
print(sq/2, met)

Solution (Python):
W, H, x, y = (int(i) for i in input().split())
area = W * H / 2
if W/2 == x and H/2 == y:
    possible = 1
else:
    possible = 0
print(area, possible)

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

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

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

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

Solution (Python):
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)

Solution (Python):
w,h,x,y=map(int,input().split())
ans1=w*h/2
if x==w/2 and y==h/2:
    ans2=1
else:
    ans2=0
print(ans1,ans2)

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

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

else:
  print(H*W / 2, 0)

Solution (Python):
w, h, x, y = map(int, input().split())
ans = []

if w == x*2 and h == y*2:
    ans.append('{:.7f}'.format(w*h/2))
    ans.append(1)
else:
    ans.append('{:.7f}'.format(w*h/2))
    ans.append(0)

print(*ans, sep=' ')

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

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

print(w * h / 2, cnt)

Solution (Python):
import sys
from collections import deque
from collections import defaultdict
import math
import copy
input = sys.stdin.readline
sys.setrecursionlimit(20000000)
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)

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

Solution (Python):
W,H,x,y = map(int,input().split())
box_s = W*H/2

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

Solution (Python):
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)

Solution (Python):
inp = list(map(int, input().split(" ")))
w = inp[0]
h = inp[1]
x = inp[2]
y = inp[3]

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

print(w*h*0.5, mp)

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

    if x * 2 == W and y * 2 == H:
        print(str(W*H/2) + " " + str(1))
    else:
        print(str(W*H/2) + " " + str(0))

Solution (Python):

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

f = 1 if x == w/2 and y == h/2 else 0
print("{} {}".format(w*h / 2, f))

Solution (Python):
W, H, x, y = list(map(int, input().split()))

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

print(W*H/2, anscnt)

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [W, H, x, y] = [long(input_raw[0]), long(input_raw[1]), long(input_raw[2]), long(input_raw[3])]
    if (H /2 == y) and  (H % 2 == 0)  and (W/2 == x) and (W % 2 == 0):
        ans2 = 1
    else:
        ans2 = 0

    
    print "%20.15f %d" % (float(H)/2.0 * W , ans2)
    return

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

    ans = max(min(H - y, y) * W, min(W - x, x) * H)
    print "%20.15f %d" % (float(ans), ans2)

if __name__ == '__main__':
    main()

Solution (Python):
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)

Solution (Python):
W,H,x,y = list(map(float,input().split()))


if float(x) == W/2.0 and float(y) == H/2.0:
    print('{:9e}'.format(W*H/2.0),'1')
else:
    print('{:9e}'.format(W*H/2.0),'0')

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

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

print(W*H/2,f)

Solution (Python):
W, H, x, y = [int(_) for _ in input().split()]

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

Solution (Python):
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)

Solution (Python):
W,H,x,y = list(map(int,input().split()))

S_max = float(W*H/2)
pl = 0

if x == (W/2):
  if y == (H/2):
    pl = 1
  
print(str(S_max) + " " + str(pl))

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

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

print(W*H/2,f)

Solution (Python):
w, h, x, y = (int(_) for _ in input().split())
area = w*h / 2
if x + x == w and y + y == h:
    yes = 1
else:
    yes = 0
print(area, yes)

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

def calculate(W, H, x, y):
	way = 0
	area = W*H/2.0
	if(x==W/2 and y==H/2):
		way = 1
	return area, way

area, way = calculate(W, H, x, y)

print("%f %d" % (area, way))

Solution (Python):
w, h, x, y = map(int, input().split(' '))

max_area = 0
square_area = w * h
multiple_ans = 1 if 2 * x == w and 2 * y == h else 0

print('{max_area} {multiple_ans}'.format(max_area=str(square_area / 2), multiple_ans=str(multiple_ans)))

Solution (Python):
from sys import stdin
W,H,x,y = [int(x) for x in stdin.readline().rstrip().split()]
if (W / 2) == x and (H / 2) == y:
    print((W * H) / 2, 1)
else:
    print((W * H) / 2 ,0)

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

flag = 0
if x + x == W and y + y == H:
    flag = 1

print(W * H / 2, flag)

Solution (Python):

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

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

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

Solution (Python):
W,H,x,y = map(int, input().split())
print(W*H*0.5,1*(W/2==x and H/2==y))

Solution (Python):
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)

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

Solution (Python):




w,h,x,y = [int(i) for i in input().split()]


if 2*x == w and 2*y == h:
    ans = 1
else:
    ans = 0
    


print(w*h/2, ans)

Solution (Python):
W, H, x, y = map(int,input().split())
print(float(W)*float(H)/2, int(x*2 == W and y*2 == H))

Solution (Python):
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)

Solution (Python):

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

Solution (Python):


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

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

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

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

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

ans = (W * H) / 2
anscnt = 0

if W - x == x and H - y == y:
    anscnt = 1
    
print(ans, end=' ')
print(anscnt)

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

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

sq0 = W*H/2

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

Solution (Python):
W, H, x, y = [int(i) for i in input().split()] 

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

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

S = W * H / 2

if x == W / 2 :
  if y == H / 2 :
    n = 1
  else : 
    n = 0
else :
  n = 0
  
ans = str(S) + " " + str(n)
print(ans)

Solution (Python):
W, H, x, y = map(int, input().split())
area = (W*H)/2.0
if W==x+x and H==y+y:
    print(area, 1)
else:
    print(area, 0)

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

Solution (Python):

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

f = 0
if ((x*2 == w) and (y*2 == h)):
    f = 1

print(w*h/2,f)

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

Solution (Python):
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)

Solution (Python):



def main():
    w, h, x, y = map(int, input().split())
    s = w * h / 2

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


if __name__ == '__main__':
    main()

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

Solution (Python):
def main():
    W, H, x, y = list(map(int, input().split()))
    split_num = int((x + x) == W and (y + y) == H)
    print("{:.6f} {}".format((W * H) / 2.0, split_num))

if __name__ == '__main__':
    main()

Solution (Python):
w,h,x0,y0=[int(i) for i in input().split()]
print(w*h/2,(1 if x0==w/2 and y0==h/2 else 0))

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

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

Solution (Python):
import numpy as np
W, H ,x, y = map(int, input().split())

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

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

Solution (Python):
W, H, x, y = (int(x) for x in input().split())

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

Solution (Python):
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)

Solution (Python):




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

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


print(ans1, ans2)

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

print(ans, ans_flg)

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

Solution (Python):
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)

Solution (Python):
hoge = input().split()
W = int(hoge[0])
H = int(hoge[1])
x = int(hoge[2])
y = int(hoge[3])

ans1 = W*H/2

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

print(ans1,ans2)

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

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
W, H, x, y = list(map(int, input().split()))
z = [0, 1]
print(W*H/2, z[x*2 == W and y*2 == H])

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

Solution (Python):
W, H, x, y = [int(i) for i in input().split()]
ans1 = W * H / 2
ans2 = 1 if (x*2==W and y*2==H) else 0
print(str(ans1) + " " + str(ans2))

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

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

Solution (Python):
W, H, x, y = map(int, input().split())
 
S = W*H/2
some = 0
if W / 2 == x and H / 2 == y:
    some = 1
else:
    some = 0

print(S, some)

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

S = float(W)*H*(1/2)

if 2*x==W and 2*y==H: print(str(S) + ' 1')
else: print(str(S) + ' 0')

Solution (Python):
class RectangleCutting:
    def __init__(self):
        W, H, x, y = map(int, input().split())
        self.W = W
        self.H = H
        self.x = x
        self.y = y

    def main(self):
        hs = self.H * self.W / 2

        if self.__is_center():
            print(hs, 1)
        else:
            print(hs, 0)

    def __is_center(self):
        if self.x * 2 == self.W and self.y * 2 == self.H:
            return True
        else:
            return False


rectangleCutting = RectangleCutting()
rectangleCutting.main()

Solution (Python):
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)

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

Solution (Python):
W, H, x, y = map(int, input().split())
S = W*H*0.5
cond = 1 if (W/2==x)&(H/2==y) else 0
print(S, cond)

Solution (Python):

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


print (str(h*w/2)+" "+str(flag))

Solution (Python):
w,h,x,y = map(float,input().split())
if w-x==w/2 and h-y == h/2:
    print(w*h/2,"1")
else:
  	print(w*h/2,"0")

Solution (Python):
W, H, x, y = map(float, input().split())
ans1 = W * H / 2
ans2 = int(W / 2 == x and H / 2 == y)
print(ans1, ans2)

Solution (Python):
W,H,x,y = map(int,input().split())
S = W*H/2

if W/2 == x and H/2 == y:
	print("%f %d" % (S,1))
else:
	print("%f %d" % (S,0))

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

Solution (Python):
W,H,x,y = map(int,input().split())
ans = W*H/2

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

print(ans,i)

Solution (Python):


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

S = W * H

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

Solution (Python):
w,h,x,y=map(int,input().split())
result=w*h/2
able=0
if x==w/2 and y==h/2:
  able=1
print(result,able)

Solution (Python):
def c_rectangle_cutting(W, H, X, Y):
    return '{} {}'.format(H * W / 2, int(2 * X == W and 2 * Y == H))

W, H, X, Y = [int(i) for i in input().split()]
print(c_rectangle_cutting(W, H, X, Y))

Solution (Python):
W, H, x, y = [int(i) for i in input().split()]
print("{:.10f}".format(W * H / 2), int(2 * x == W and 2 * y == H))

Solution (Python):
from sys import stdin
W, H, x, y = [int(_) for _ in stdin.readline().rstrip().split()]
ans1 = W*H/2
ans2 = int((x+x==W) and (y+y==H))
print(ans1, ans2)

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

print(W*H/2, int(x*2 == W and y*2 == H))

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

Solution (Python):
import collections
w, h, x, y = map(int, input().split())

ans = 0
if x + x == w and y + y == h:
    ans = 1

print("{} {}".format(w * h / 2, ans))

Solution (Python):

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

if 2*x == W and 2*y == H:
    b = 1
else:
    b = 0
print(a, b)

Solution (Python):
w, h, x, y = (int(i) for i in input().split())
a1 = w*h/2
a2 = 0
if( x==w/2 and y==h/2 ):
    a2=1
print(a1, a2)

Solution (Python):
W,H,x,y=map(float, input().split())
 

A1=W*H/2
 

A2=0
if A1==min(x*H,(W-x)*H) and A1==min(y*W,(H-y)*W):
  A2=1

print(A1,A2)

Solution (Python):
w,h,x,y=map(int,input().split())
m=int(w-x==x and h-y==y)
print(w*h/2,m)

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


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


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(W, H, x, y):
    if W/2 == x and H/2 == y:
        return (W*H)/2, 1

    return (W*H)/2, 0


def main():
    W, H, x, y = read_int_n()
    print('%f %d' % slv(W, H, x, y))


if __name__ == '__main__':
    main()

Solution (Python):
w, h, x, y = map(int, input().split())
ans = []
ans.append(w * h / 2)
if w == x * 2 and h == y * 2:
    ans.append(1)
else:
    ans.append(0)
print(" ".join(map(str, ans)))

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


main()

Solution (Python):
WHxy = list(map(int, input().split()))
W = WHxy[0]
H = WHxy[1]
x = WHxy[2]
y = WHxy[3]

sq = W*H /2

if x == W/2 and y == H/2:
    print("{} 1".format(sq))
else:
    print("{} 0".format(sq))

Solution (Python):
w, h, x, y = list(map(int, input().split(" ")))

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

Solution (Python):
w,h,x,y=map(int,input().split())
result=w*h/2
able=0
if x==w/2 and y==h/2:
  able=1
print(result,able)

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

Solution (Python):
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)

Solution (Python):
W, H, x, y = map(int,input().split())
buf_x = W-x
buf_y = H-y
if buf_x >= x:
  ver_area = H*x
else:
  ver_area = H*buf_x
if buf_y >= y:
  hori_area = W*y
else:
  hori_area = W*buf_y

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

Solution (Python):
W, H, x, y = [int(_) for _ in input().split()]
if (2 * x == W) and (2 * y == H):
    f = 1
else:
    f = 0

print(W * H / 2, f)

Solution (Python):
W,H,x,y = [int(x) for x in input().split()]

space = W*H

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

Solution (Python):
w,h,x,y = map(int, input().split())
p = 0
if (x==0)|(x==w)|(y==0)|(y==h):
  mens = w*h/2
  p = 0
elif (x==(w/2))|(y==(h/2)):
  mens = w*h/2
  if (x==(w/2))&(y==(h/2)):
    p = 1
  else:
    p = 0
elif ((x/y)==(w/h))|(y == -(h/w)*x+h):
  p = 1
  mens = w*h/2
else:
  if ((y<h/w*x)&(y<-(h/w)*x+h))|((y>h/w*x)&(y>-(h/w)*x+h)):
    p = 0
    mens = w*h/2
  else:
    p = 0
    mens = w*h/2
print(mens, p)

Solution (Python):
W, H, x, y = map(int, input().split())
ans_s = float((W*H)/2)
ans_d = 0
if ((W%2 == 0)&(x == W//2)) & ((H%2 == 0)&(y == H//2)):
  ans_d = 1
print("{} {}".format(ans_s, ans_d))

Solution (Python):
W, H, x, y = [int(i) for i in input().split()]

counter = 0
if x == W/2:
    if y == H/2:
        counter+=1

if counter == 0:
    print(W*H/2, 0)
else:
    print(W*H/2, 1)

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

Solution (Python):

"""



"""
import sys


def solve(W, H, x, y):
    if y == 0 or x == 0 or y == H or x == W:
        return W*H/2.0, 0

    if x == W/2:
        if y == H/2:
            return W*H/2.0, 1
        return W*H/2.0, 0
    if y == H/2:
        return W*H/2.0, 0

    w1 = x * H
    w2 = (W-x) * H
    ww1 = min(w1, w2)

    w3 = y * W
    w4 = (H-y) * W
    ww2 = min(w3, w4)
    if ww1 == ww2:
        return ww1, 1
    return W*H/2, 0


def main(args):
    W, H, x, y = map(int, input().split())
    ans = solve(W, H, x, y)
    print(*ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

x1=x*h
x2=(w-x)*h
y1=y*w
y2=(h-y)*w
f=0
if x==0 or y==0 or x==w or y==h:
    a=1/2*w*h
    f=1
else:    
    
    a=1/2*w*h
    
if min(x1,x2)==min(y1,y2) and f==0:
    b=1
    
else:
    b=0
    
print(a,b)

Solution (Python):
w,h,x,y=map(int,input().split(' '))
if x==w/2 and y==h/2:
    print(str(w*h/2)+" "+ "1")
else:
    print(str(w*h/2)+" "+ "0")

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

Solution (Python):
w,h,x,y = map(int,input().split())
res = w * h / 2

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

Solution (Python):
W, H, x, y = map(int, input().split(' '))

area = float(W * H * 0.5)
mul = 0
if float(x) == W / 2 and float(y) == H / 2:
    mul = 1
print(area, mul)

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

max_menseki=W*H/2
if W%2==0 and W//2==x and H//2==y and H%2==0:
    print(max_menseki,"1")
else:
    print(max_menseki,"0")

Solution (Python):
W, H, x, y = map(int, input().split(" "))

rect = (W * H) / 2
if W == x * 2 and H == y * 2:
    print(str(rect) + " 1")
else:
    print(str(rect) + " 0")

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

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

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

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



if not (x==0 or y==0 or x==w or y==h) and h/w == y/x or y == h - (h*x/w):
  print("{} {}".format(w*h/2,'1'))
else:
  print("{} {}".format(w*h/2,'0'))

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

Solution (Python):
W, H, x, y = map(int, input().split(' '))


multi_ans = 0

if ((x == 0 and y == 0) or (x == 0 and y == H) or (y == 0 and x == W) or (y == H and x == W)):
    multi_ans = 0
elif (W==H and not((x == W - x or y == H - y))):
    multi_ans == 1
elif (x != 0 and y != 0):
    if (W / x == H / y):
        if (x == W - x and y == H -y):
            multi_ans = 1
        else:
            multi_ans = 0

ans = W * H /2.0
print("{} {}".format(ans, multi_ans))

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

if w / 2 == x and h / 2 == y:
    ans = w / 2 * h
    print("{:.9f}".format(ans), 1)
    
else:
    ans = w / 2 * h
    print("{:.9f}".format(ans), 0)

Solution (Python):
w, h, x, y = [int(v) for v in input().split()]


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

Solution (Python):
W, H, x, y = map(float, input().split())

if x == W or y == H or x == 0.0 or y == 0.0:
    ans = H*W/2
    ans_2 = 0
elif x*H == y*W or (W-x)*H == y*W:
    ans = H*W/2
    if float(x) == W/2 and float(y) == H/2:
        ans_2 = 1
    else:
        ans_2 = 0
elif abs(W/2-x) * (H/2) / abs(H/2-y) < W/2:
    ans = H*W/2
    ans_2 = 0
else:
    yoko_a = W * y
    yoko_b = W * (H-y)
    yoko = min(yoko_a, yoko_b)

    tate_a = H * x
    tate_b = H * (W-x)
    tate = min(tate_a, tate_b)
    
    ans = max(tate, yoko)
    ans = float(ans)

    if tate == yoko:
        ans_2 = 1
    else:
        ans_2 = 0

print(ans, ans_2)

Solution (Python):
W,H,x,y=(int(x) for x in input().split())
print(W*H/2)
if x==W/2 and y==H/2:
    print(1)
else:
    print(0)

Solution (Python):
w,h,x,y = map(int, input().split())
multi = 1 if x == w/2 and y == h/2 else 0
print("{:.9f}".format(w*h/2), multi)

Solution (Python):
W, H, x, y= map(int, input().split())
maxS = 0
flag = 0

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

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

ans2 = 0
if w == 2*x:
    ans1 = x*h
    if h == 2*y and ans1==y*w:
        ans2 = 1
elif h == 2*y:
    ans1 = y*w
    if w == 2*x and ans1==x*h:
        ans2 = 1
else:
    a = -(h-2*y)/(2*x-w)
    b = -a*x+y
    ans1 = min(w*(a*w+2*b)/2, (2*h-a*w-2*b)*w/2)

print(ans1,' ',ans2)

Solution (Python):
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)))

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

Solution (Python):


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

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

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

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

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


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



if count == 1:
    print("{0:.6f}".format(abs(s)),0)
else:
    print("{0:.6f}".format(abs(s)),1)

Solution (Python):
w, h, x, y = (int(i) for i in input().split())
a1 = w*h/2
a2 = 0
if( ((w==h) and (x == y and not((x==0 and y==0) or (x==w and y==h)))) or ((w!=h) and (x==w/2) and (y==h/2))  ):
    a2=1
print(a1, a2)