Buggy python submission (verdict: Runtime Error):
W, H, x, y = map(float, input().split())

if x == W or y == H or x == 0 or y == 0:
    ans = H*W/2
    ans_2 = 0
if x*H == y*W or (W-x)*H == y*W or :
    ans = H*W/2
    if float(x) == W/2 and float(y) == H/2:
        ans_2 = 1
    else:
        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)

Fixed submission:
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)

Buggy python submission (verdict: Runtime Error):
W, H, x, y = map(int, input().split())

if 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
        print(ans, ans_2)
else:
    # 0 0
    _y = y*W/x
    _x = W
    if _y > H:
        _y = H
        _x = x*H/y
    a_00 = _x*_y/2

    # H 0
    _y = H
    _x = x * H / (H-y)
    if _x > W:
        _x = W
        _y = (H-y)*W/x
    a_H0 = _x*_y/2

    # 0 W
    _y = y*W/(W-x)
    _x = W
    if _y > H:
        _y = H
        _x = H*(W-x)/y
    a_0W = _x*_y/2

    # H W
    _y = H
    _x = (W-x)*H/(H-y)
    if _x > W:
        _x = W
        _y = (H-y)*W/(W-x)
    a_HW = _x*_y/2

    yoko_a = W * y
    yoko_b = W * (H-y)
    yoko = float(min(yoko_a, yoko_b))

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

    a = [a_HW, a_H0, a_0W, a_00, yoko, tate]
    a = sorted(a)
    print(a[-1])
    if a[-1] == a[-2]:
        print(1)
    else:
        print(0)


Fixed submission:
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)

Buggy python submission (verdict: Runtime Error):
W, H, x, y = map(int, input().split())

# 0 0
_y = y*W/x
_x = W
if _y > H:
    _y = H
    _x = x*H/y
a_00 = _x*_y/2

# H 0
_y = H
_x = x * H / (H-y)
if _x > W:
    _x = W
    _y = (H-y)*W/x
a_H0 = _x*_y/2

# 0 W
_y = y*W/(W-x)
_x = W
if _y > H:
    _y = H
    _x = H*(W-x)/y
a_0W = _x*_y/2

# H W
_y = H
_x = (W-x)*H/(H-y)
if _x > W:
    _x = W
    _y = (H-y)*W/(W-x)
a_HW = _x*_y/2

yoko_a = W * y
yoko_b = W * (H-y)
yoko = float(min(yoko_a, yoko_b))

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

a = [a_HW, a_H0, a_0W, a_00, yoko, tate]
a = sorted(a)
print(a[-1])
if a[-1] == a[-2]:
    print(1)
else:
    print(0)


Fixed submission:
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)