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



Sample input:
2 3 1 2


Sample output:
3.000000 0

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
ans=a[0]*a[1]/2,1
print(ans,1 if a[0]/2==a[2] and a[1]/2==a[3] else 0)

Submission status: Wrong Answer

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

S1 = 0
S2 = 0
c = 0
if x < W/2:
    S1 = float(x*H)
    if y < H/2:
        S2 = float(y*W)
    else:
        S2 = float((H-y)*W)
else:
    S1 = float((W-x)*H)
    if y < H/2:
        S2 = float(y*W)
    else:
        S2 = float((H-y)*W)  

if x == W/2 and y == H/2:
    c = 1
if S1 > S2:
    print(S1,c)
else:
    print(S2,c)

Submission status: Wrong Answer

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

S1 = 0
S2 = 0
c = 0
if x < W/2:
    S1 = x*H
    if y < H/2:
        S2 = y*W
    else:
        S2 = (H-y)*W
else:
    S1 = (W-x)*H
    if y < H/2:
        S2 = y*W
    else:
        S2 = (H-y*W)  

if x == W/2 and y == H/2:
    c = 1
if S1 > S2:
    print(float(S1),c)
else:
    print(float(S2),c)

Submission status: Wrong Answer

Solution code:
a = list(map(float,input().split()))
answer = float(a[0] * a[1])
print(answer)
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
answer = a[0] * a[1]
print(answer)
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
answer = a[0] * a[1]
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
W,H,x,y=map(int,raw_input().split())
if 2*x==W and 2*y==H:
    print("%f %d"%(W*H*0.5, 1))
else:
    print("%f %d"%(W*H*0.5, 2))

Submission status: Wrong Answer

Solution code:
W,H,x,y=map(int,raw_input().split())
if x==W/2.0 and y==H/2.0:
    print("%f %d"%(W*H*0.5, 1))
else:
    print("%f %d"%(W*H*0.5, 2))

Submission status: Wrong Answer

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

m = W * H
half = m / 2.0

multi = '0'
if W/2.0 == x and H/2.0 == y:
    multi == '1'

print(half, multi)

Submission status: Wrong Answer

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

m = W * H
half = m / 2.0

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

print(half, multi)

Submission status: Wrong Answer

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

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

print(str(s)+  str(' ') + str(k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(S, div)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

w, h, x, y = map(int,input().split())
if w/2 == x or h/2 == y:
        max = float(((w*h)/2))
        print("{} 1".format(max))
else:
        max = float(((w*h)/2))
        print("{} 0".format(max))

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

w, h, x, y = map(int,input().split())
if w == x and h == y:
        i = float((y/x)*x)
        j = float((y/x)*y)
        max = float(((i*j)/2))
        print("{} 1".format(max))
else:
        max = float(((w*h)/2))
        print("{} 0".format(max))

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

w, h, x, y = map(int,input().split())
if w == x and h == y:
        i = (y/x)*x
        j = (y/x)*y
        max = float(((i*j)/2))
        print("{} 1".format(max))
else:
        max = float(((w*h)/2))
        print("{} 0".format(max))

Submission status: Wrong Answer

Solution code:
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)
else:
  ans = 1 if min(x, w - x) * h == min(y, h - y) * w else 0
  print(max(min(x, w - x) * h, min(y, h - y) * w), ans)

Submission status: Wrong Answer

Solution code:
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)
else:
  ans = 1 if x * 2 == w or y * 2 == h else 0
  print(max(min(x, w - x) * h, min(y, h - y) * w), ans)

Submission status: Wrong Answer

Solution code:
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)
else:
  ans = 1 if x * 2 == w and y * 2 == h else 0
  print(max(min(x, w - x) * h, min(y, h - y) * w), ans)

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())

if a/2 == c and b/2 == d:
  print(min(a-c,c) * b, 1)
elif a == b and c == d:
  print(min(a-c,c) * b, 1)
else:
  print(max(min(a-c,c)*b, min(b-d,d)*a), 0)

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())

if a/2 == c and b/2 == d:
  print(min(a-c,c) * b, 1)
else:
  print(max(min(a-c,c)*b, min(b-d,d)*a), 0)

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())

if a == b and c == d:
  print(min(a-c,c) * b, 1)
else:
  print(max(min(a-c,c)*b, min(b-d,d)*a), 0)

Submission status: Wrong Answer

Solution code:
x_input = list(map(int,input().rstrip().split(" ")))

def makey(x_input):
    W,H,x,y = x_input
    is_only = True
    if x>y:
        S = x*H
    elif x==y:
        if W>=H:
            S = W*x
        else:
            S = x+H
    else:
        S = W+y
    if x!=0 and y!=0:
        if W/x==H/y:
            is_only = False
    else:
        is_only = True
    return S, is_only

y,is_only = makey(x_input)
if is_only:
  z = 0
else:
  z = 1

print(y, z)

Submission status: Wrong Answer

Solution code:
x_input = list(map(int,input().rstrip().split(" ")))

def makey(x_input):
    W,H,x,y = x_input
    is_only = True
    if x>y:
        S = x*H
    elif x==y:
        if W>=H:
            S = W*y
        else:
            S = x*H
    else:
        S = W*y
    if x!=0 and y!=0:
        if W/x==H/y:
            is_only = False
    else:
        is_only = False
    return S, is_only

y,is_only = makey(x_input)
if is_only:
  z = 0
else:
  z = 1

print(y, z)

Submission status: Wrong Answer

Solution code:
x_input = list(map(int,input().rstrip().split(" ")))

def makey(x_input):
    W,H,x,y = x_input
    is_only = True
    if x>y:
        S = x*H
    elif x==y:
        if W>=H:
            S = W*x
        else:
            S = x*H
    else:
        S = W*y
    if x!=0 and y!=0:
        if W/x==H/y:
            is_only = False
    else:
        is_only = False
    return S, is_only

y,is_only = makey(x_input)
if is_only:
  z = 0
else:
  z = 1

print(y, z)

Submission status: Wrong Answer

Solution code:
x_input = list(map(int,input().rstrip().split(" ")))

def makey(x_input):
    W,H,x,y = x_input
    is_only = True
    if x>y:
        S = x*H
    elif x==y:
        if W>=H:
            S = W*x
        else:
            S = x+H
    else:
        S = W+y
    if x!=0 and y!=0:
        if W/x==H/y:
            is_only = False
    else:
      is_only = False
    return S, is_only

y,is_only = makey(x_input)
if is_only:
  z = 0
else:
  z = 1

print(y, z)

Submission status: Wrong Answer

Solution code:
x_input = list(map(int,input().rstrip().split(" ")))

def makey(x_input):
    W,H,x,y = x_input
    is_only = True
    if x>y:
        S = x*H
    elif x==y:
        if W>=H:
            S = W*x
        else:
            S = x+H
    else:
        S = W+y
    if x!=0 and y!=0:
        if W/x==H/y:
            is_only = False
    return S, is_only

y,is_only = makey(x_input)
if is_only:
  z = 0
else:
  z = 1

print(y, z)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
import numpy as np

W, H, x, y = [int(i) for i  in re.split(" ", input())]

print(W * H / 2)

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

Submission status: Wrong Answer

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

horizontal_square = 0.0
vertical_square = 0.0
half_triangle = 0.0

# horizontal
if (y != 0) & (y != H):
    y_min = min(y, H-y)
    horizontal_square = y_min * W

# vertical
if (x != 0) & (x != W):
    x_min = min(x, W-x)
    vertical_square = x_min * H

# if (x, y) is on vertex
if (horizontal_square == 0) & (vertical_square == 0):
    half_triangle = W * H / 2

if half_triangle != 0:
    print('{} {}'.format(half_triangle, 0))
elif horizontal_square == vertical_square:
    print('{} {}'.format(horizontal_square, 1))
else:
    print('{} {}'.format(max(horizontal_square, vertical_square), 0))

Submission status: Wrong Answer

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

horizontal_square = 0
vertical_square = 0

# horizontal
if (y != 0) & (y != H):
    y_min = min(y, H-y)
    horizontal_square = y_min * W

# vertical
if (x != 0) & (x != W):
    x_min = min(x, W-x)
    vertical_square = x_min * H

# if (x, y) is on vertex
if (horizontal_square == 0) & (vertical_square == 0):
    square = W * H
    half = square / 2
    print('{} {}'.format(half, 0))
elif horizontal_square == vertical_square:
    print('{} {}'.format(horizontal_square, 1))
else:
    print('{} {}'.format(max(horizontal_square, vertical_square), 0))

Submission status: Wrong Answer

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

horizontal_square = 0
vertical_square = 0
# horizontal
if (y != 0) & (y != H):
    y_min = min(y, H-y)
    horizontal_square = y_min * W

# vertical
if (x != 0) & (x != W):
    x_min = min(x, W-x)
    vertical_square = x_min * H

if horizontal_square == vertical_square:
    print('{} {}'.format(horizontal_square, 1))
else:
    print('{} {}'.format(
        max(horizontal_square, vertical_square), 0
    ))

Submission status: Wrong Answer

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

print(W * H / 2, 1)

Submission status: Wrong Answer

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

print(W * H, 0)

Submission status: Wrong Answer

Solution code:
w, h, x, y = [float(i) for i in input().split()]

ans = str(float((w * h) / 2))

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

print(ans, ans2)

Submission status: Wrong Answer

Solution code:
w, h, x, y = [float(i) for i in input().split()]

srt = float(w * h)

if srt - (w * y) <= srt / 2:
    wy = srt - (w * y)
else:
    wy = w * y

if srt - (h * x) <= srt / 2:
    hx = srt - (h * x)
else:
    hx = h * x

if wy > hx:
    ans = wy
else:
    ans = hx

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

print(ans, ans2)

Submission status: Wrong Answer

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

srt = w * h

if w > h:
   ans = str(float(y * w))
elif h > w:
    ans = str(float(x * h))
else:
    ans = str(float(x * h))

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

print(ans, ans2)

Submission status: Wrong Answer

Solution code:
W,H,x,y = [int(i) for i in input().split()]
flag=0
if W==x+x & H==y+y:
    flag=1



print(W*H/2,flag)

Submission status: Wrong Answer

Solution code:
W,H,x,y = [int(i) for i in input().split()]
flag=0
if W==x+x & H==y+y:
    flag=1



print(float(W*H/2),flag)

Submission status: Wrong Answer

Solution code:
W,H,x,y = [int(i) for i in input().split()]
flag=0
if W==x*2 & H==y*2:
    flag=1



print(float(W*H/2),flag)

Submission status: Wrong Answer

Solution code:
w, h, x, y, *yobun = [i for i in map(int,input().split())]

if (w < 1 or 10**9 < h):
    print("Wは１以上,Hは10^9以下にしてください")
    exit(1)
elif (x < 0 or w < x):
    print("0 <= x <= W にしてください")
    exit(1)

elif (y < 0 or h < y):
    print("0 <= y <= H にしてください")
    exit(1)

s = []
for i in range(w+1):
    for j in range(y+1):
        if (i == x):
            if (j != y):
                s.append(min(h * x, h * (w-x)))

        else:
            a = (y - j) / (x - i)
            b = y - a * x
            l = y + a * (w - x) #直線のx座標がwの時のy座標

            if b >= 0:
                if l >= y:
                    if a == 0 and b == 0:
                        s.append(0)
                    elif a == 0:
                        s.append(min(b * w , (h-b) * w ))
                    else:
                        x = (h - b) / a
                        s.append(1/2 * (h-b) * x)

                elif l <= 0:
                    # if a == 0:
                    #     s.append(0)
                    # else:
                        x = -b / a
                        s.append(1/2 * b * x)

                else:
                    s.append(min( 1/2 * (b + l) * w , 1/2 * ((h-b)+(h-l)) * w ))

            else:
                x = -b / a
                if l <= h:
                    s.append(1/2 * l * (w - x))
                else:
                    z = (h - b) / a
                    s.append(min(1/2 * (x+z) * h, 1/2 * ((w - x) + (w - z)) * h))
print(s)
s_max = max(s)
kosu = [i for i, x in enumerate(s) if x == s_max]
if (len(kosu) == 1):
    print(s_max, "0")
else:
    print(s_max, "1")

Submission status: Wrong Answer

Solution code:
class Dot():
    def __init__(self,x: int,y: int):
        self.__dot = [x,y]
    def getX(self) -> int:
        return self.__dot[0]
    def getY(self) -> int:
        return self.__dot[1]
    def __sub__(self,dot2):
        return self.__class__(self.getX() - dot2.getX(),dot2.getY() - dot2.getY())
    def __repr__(self):
        return "( " + str(self.getX()) + " , " + str(self.getY()) + " )"

class Direction():
    vertical = "vertical "
    horizontal = "horizontal"
    def __init__(self,dire: str):
        __direction = str()
        self.direction = dire
    def getDirection(self) -> str:
        return self.__direction

class Line():
    __startPosiIndex = 0
    __endPosiIndex = 1
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[self.__startPosiIndex]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[self.__endPosiIndex]
    def getDirection(self) -> Direction:
        if (self.getEndPosi() - self.getStartPosi()).getX() == 0:
            return Direction.vertical
        elif (self.getEndPosi() - self.getStartPosi()).getY() == 0:
            return Direction.horizontal
    @staticmethod
    def generateLine(assingPoint: Dot,direction: str,length: int):
        if direction == Direction.vertical:
            #print(Direction.vertical)
            return Line(Dot(assingPoint.getX(),0),Dot(assingPoint.getX(),length))
        elif direction == Direction.horizontal:
            #print(Direction.horizontal)
            return Line(Dot(0,assingPoint.getY()),Dot(length,assingPoint.getY()))
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

class Rectangular():
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[0]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[1]
    def split(self,line: Line):
        if line.getDirection() == Direction.horizontal:
            return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi())
        elif line.getDirection() == Direction.vertical:
           return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi()) 
    def getArea(self) -> int:
        width = abs(self.getEndPosi().getX() - self.getStartPosi().getX())
        hight = abs(self.getEndPosi().getY() - self.getStartPosi().getY())
        #print("width:" + str(width) + " * hight:" + str(hight) + " = " + str(width*hight))
        return width*hight
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

indata = list(map(int,input().split()))
width = indata[0]
hight = indata[1]
X = indata[2]
Y = indata[3]

assingPoint = Dot(X,Y)
rec1 = Rectangular(Dot(0,0),Dot(width,hight))
rec1.getArea()
vertLine = Line.generateLine(assingPoint,Direction.vertical,hight)
horiLine = Line.generateLine(assingPoint,Direction.horizontal,width)

ways = 0

subrec1, subrec2 = rec1.split(vertLine)

if subrec1.getArea() == subrec2.getArea():
    ways = 1

areas1 = min([subrec1.getArea(),subrec2.getArea()])

if areas1 == 0:
    areasq = max([subrec1.getArea(),subrec2.getArea()])

subrec3,subrec4 = rec1.split(horiLine)
areas2 = min([subrec3.getArea(),subrec4.getArea()])

if subrec3.getArea() == subrec4.getArea():
    ways = 1

if areas2 == 0:
    areas2 = max([subrec3.getArea(),subrec4.getArea()])

if areas1 == areas2:
    ways = 1
minMaxArea = max([areas1,areas2])

print(minMaxArea,end=" ")
print(ways)

Submission status: Wrong Answer

Solution code:
class Dot():
    def __init__(self,x: int,y: int):
        self.__dot = [x,y]
    def getX(self) -> int:
        return self.__dot[0]
    def getY(self) -> int:
        return self.__dot[1]
    def __sub__(self,dot2):
        return self.__class__(self.getX() - dot2.getX(),dot2.getY() - dot2.getY())
    def __repr__(self):
        return "( " + str(self.getX()) + " , " + str(self.getY()) + " )"

class Direction():
    vertical = "vertical "
    horizontal = "horizontal"
    def __init__(self,dire: str):
        __direction = str()
        self.direction = dire
    def getDirection(self) -> str:
        return self.__direction

class Line():
    __startPosiIndex = 0
    __endPosiIndex = 1
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[self.__startPosiIndex]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[self.__endPosiIndex]
    def getDirection(self) -> Direction:
        if (self.getEndPosi() - self.getStartPosi()).getX() == 0:
            return Direction.vertical
        elif (self.getEndPosi() - self.getStartPosi()).getY() == 0:
            return Direction.horizontal
    @staticmethod
    def generateLine(assingPoint: Dot,direction: str,length: int):
        if direction == Direction.vertical:
            #print(Direction.vertical)
            return Line(Dot(assingPoint.getX(),0),Dot(assingPoint.getX(),length))
        elif direction == Direction.horizontal:
            #print(Direction.horizontal)
            return Line(Dot(0,assingPoint.getY()),Dot(length,assingPoint.getY()))
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

class Rectangular():
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[0]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[1]
    def split(self,line: Line):
        if line.getDirection() == Direction.horizontal:
            return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi())
        elif line.getDirection() == Direction.vertical:
           return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi()) 
    def getArea(self) -> int:
        width = abs(self.getEndPosi().getX() - self.getStartPosi().getX())
        hight = abs(self.getEndPosi().getY() - self.getStartPosi().getY())
        #print("width:" + str(width) + " * hight:" + str(hight) + " = " + str(width*hight))
        return width*hight
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

indata = list(map(int,input().split()))
width = indata[0]
hight = indata[1]
X = indata[2]
Y = indata[3]

assingPoint = Dot(X,Y)
rec1 = Rectangular(Dot(0,0),Dot(width,hight))
rec1.getArea()
vertLine = Line.generateLine(assingPoint,Direction.vertical,hight)
horiLine = Line.generateLine(assingPoint,Direction.horizontal,width)

ways = 0

subrec1, subrec2 = rec1.split(vertLine)

if subrec1.getArea() == subrec2.getArea():
    ways = 1

areas1 = min([subrec1.getArea(),subrec2.getArea()])

if areas1 == 0:
    areasq = max([subrec1.getArea(),subrec2.getArea()])

subrec3,subrec4 = rec1.split(horiLine)
areas2 = min([subrec3.getArea(),subrec4.getArea()])

if subrec2.getArea() == subrec3.getArea():
    ways = 1

if areas2 == 0:
    areas2 = max([subrec3.getArea(),subrec4.getArea()])

if areas1 == areas2:
    ways = 1
minMaxArea = max([areas1,areas2])

print(minMaxArea,end=" ")
print(ways)

Submission status: Wrong Answer

Solution code:
class Dot():
    def __init__(self,x: int,y: int):
        self.__dot = [x,y]
    def getX(self) -> int:
        return self.__dot[0]
    def getY(self) -> int:
        return self.__dot[1]
    def __sub__(self,dot2):
        return self.__class__(self.getX() - dot2.getX(),dot2.getY() - dot2.getY())
    def __repr__(self):
        return "( " + str(self.getX()) + " , " + str(self.getY()) + " )"

class Direction():
    vertical = "vertical "
    horizontal = "horizontal"
    def __init__(self,dire: str):
        __direction = str()
        self.direction = dire
    def getDirection(self) -> str:
        return self.__direction

class Line():
    __startPosiIndex = 0
    __endPosiIndex = 1
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[self.__startPosiIndex]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[self.__endPosiIndex]
    def getDirection(self) -> Direction:
        if (self.getEndPosi() - self.getStartPosi()).getX() == 0:
            return Direction.vertical
        elif (self.getEndPosi() - self.getStartPosi()).getY() == 0:
            return Direction.horizontal
    @staticmethod
    def generateLine(assingPoint: Dot,direction: str,length: int):
        if direction == Direction.vertical:
            #print(Direction.vertical)
            return Line(Dot(assingPoint.getX(),0),Dot(assingPoint.getX(),length))
        elif direction == Direction.horizontal:
            #print(Direction.horizontal)
            return Line(Dot(0,assingPoint.getY()),Dot(length,assingPoint.getY()))
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

class Rectangular():
    def __init__(self,start: Dot,end: Dot):
        self.__coordinate = []
        self.__coordinate.append(start)
        self.__coordinate.append(end)
    def getStartPosi(self) -> Dot:
        return self.__coordinate[0]
    def getEndPosi(self) -> Dot:
        return self.__coordinate[1]
    def split(self,line: Line):
        if line.getDirection() == Direction.horizontal:
            return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi())
        elif line.getDirection() == Direction.vertical:
           return Rectangular(self.getStartPosi(),line.getEndPosi()),Rectangular(line.getStartPosi(),self.getEndPosi()) 
    def getArea(self) -> int:
        width = abs(self.getEndPosi().getX() - self.getStartPosi().getX())
        hight = abs(self.getEndPosi().getY() - self.getStartPosi().getY())
        #print("width:" + str(width) + " * hight:" + str(hight) + " = " + str(width*hight))
        return width*hight
    def __repr__(self):
        return "[" + self.getStartPosi().__repr__() + " -> " + self.getEndPosi().__repr__() + "]"

indata = list(map(int,input().split()))
width = indata[0]
hight = indata[1]
X = indata[2]
Y = indata[3]

assingPoint = Dot(X,Y)
rec1 = Rectangular(Dot(0,0),Dot(width,hight))
rec1.getArea()
vertLine = Line.generateLine(assingPoint,Direction.vertical,hight)
horiLine = Line.generateLine(assingPoint,Direction.horizontal,width)


subrec1, subrec2 = rec1.split(vertLine)
areas1 = min([subrec1.getArea(),subrec2.getArea()])

if areas1 == 0:
    areasq = max([subrec1.getArea(),subrec2.getArea()])

subrec3,subrec4 = rec1.split(horiLine)
areas2 = min([subrec3.getArea(),subrec4.getArea()])

if areas2 == 0:
    areas2 = max([subrec3.getArea(),subrec4.getArea()])

ways = 0
if areas1 == areas2:
    ways = 1
minMaxArea = max([areas1,areas2])

print(minMaxArea,end=" ")
print(ways)