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: Accepted

Solution code:
W,H,x,y=list(map(int,input().split()))
s=W*H/2

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

Submission status: Accepted

Solution code:
#create date: 2020-06-29 13:35

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = h*w*0.5
    flag = int(x == 0.5*w and y == 0.5*h)
    print("{} {}".format(s, flag))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans0 = float(W * H) / 2

ans1 = 0
if W%2 == 0 and H%2 == 0 and W//2 == x and H//2 == y:
    ans1 = 1
    
print(ans0, ans1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

First = min(W * (H - y), W * y)
Second = min(x * H, (W - x) * H)
check = 0
if x * 2 == W and y * 2 == H:
    check = 1
print(W * H / 2, check)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cx = W/2
cy = H/2

area = (W*H)/2
if x==cx and y==cy:
    judge = 1
else:
    judge = 0

print(f'{area:.09f}', judge)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h,x,y=map(int,input().split())
ans1=(w*h)/2.0
ans2=0
if (w/2==x)and(h/2==y):
    ans2=1
print('%f %d'%(ans1,ans2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

W, H, x, y = map(int, sys.stdin.readline().split())

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

print(W*H/2, multi)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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=W*H/2

print(ans1,ans2)

Submission status: Accepted

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

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

Submission status: Accepted

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

max_area = float(W) * float(H) / 2.0
print("{} {}".format(max_area, 1 if 2*x == W and 2*y == H else 0))

Submission status: Accepted

Solution code:
#ABC130 C-Rectangle Cutting 14:59

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

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

Submission status: Accepted

Solution code:
#ABC130 C-Rectangle Cutting 14:59

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

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

Submission status: Accepted

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

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

print(f"{ans1} {ans2}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

ans1 = w*h/2
ans2 = 0

if x == w/2 and y == h/2:
    ans2 = 1

print(ans1, ans2)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    ans = [W * H / 2]

    if W == 2 * x and H == 2 * y:
        ans.append(1)
    else:
        ans.append(0)

    print(*ans)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(W * H / 2, num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc130/tasks/abc130_c

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

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

print(W * H / 2, num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

t = w*h/2

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

Submission status: Accepted

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

s = w*h/2

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

print(s, t)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from decimal import Decimal

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

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

Submission status: Accepted

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

d = W * H / 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(w, h, x, y):
    #   h|-----|--|
    #    |-----|--|
    #    |-----|--|
    #   y|-----o--|
    #    |-----|--|
    #    0     x  w

    is_multi = (x == w/2) and (y == h/2)
    return "{:05f}".format(float((h * w)/2)), is_multi


if __name__ == '__main__':
    w, h, x, y = map(int, input().split())
    area, is_multi = solve(w, h, x, y)
    print(area, int(is_multi))

Submission status: Accepted

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(W*H / 2,R)

Submission status: Accepted

Solution code:
def main():
    W,H,x,y = [int(x) for x in 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()

Submission status: Accepted

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

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

print(W*H/2, d)

Submission status: Accepted

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

mx=W*H/2
mul=0
if x==W/2 and y==H/2:
    mul=1

print(mx, mul)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    W, H, x, y = map(int, input().split())
    diff = 1e-5
    mid_W, mid_H = W / 2, H / 2
    if abs(x - mid_W) < diff and abs(y - mid_H) < diff:
        t = 1
    else:
        t = 0

    print(W*H/2, t)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

Solution code:
# 点(x, y)から長方形の中心を通る直線を引くと面積を半分にすることができ、分割された小さい方の面積が最大となる
# 点(x, y)が長方形の中心と一致する場合、直線は複数存在する

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

s = w * h
s_min = s / 2

# 中心
a = w / 2
b = h / 2

divide = 0

if x == a and y == b:
    divide = 1
    print(s_min, divide)
else:
    print(s_min, divide)

Submission status: Accepted

Solution code:
w, h, x, y = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
# k = int(input())
#L = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
print(w*h/2, end=" ")
if x == w/2 and y == h/2:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys

input = lambda: sys.stdin.readline().rstrip()


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

    area = W * H * 0.5
    res = 0
    if W % 2 == 0 and H % 2 == 0 and x == W // 2 and y == H // 2:
        res = 1

    print(area, res)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
W,H,x,y = (int(x) for x in input().split())
ans1 =0
ans2 =0
if W/2 ==x and H/2 ==y:
    ans2= 1
else:
    ans2 =0
ans1 =W *H/2
print(ans1,ans2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    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__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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

S=(W*H)/2

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

print(S,f)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fractions
import sys
from functools import reduce
import math

input = sys.stdin.readline

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

def divide_list(l, args):
    result = []
    pre = 0
    for i, a in enumerate(args):
        if i != 0:
            pre = args[i-1]
        result.append(l[pre:a])
        if i == len(args) - 1:
            result.append(l[a:])
    return result

def divide_two(n):
    c = 0
    while True:
        if c >= 2:
            break
        if n % 2 != 0:
            break
        n //= 2
        c += 1
    return c

def get_camulative(l):
    import itertools
    # 累積和
    return [0] + list(itertools.accumulate(l))

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


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


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


def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def gcd(*numbers):
    return reduce(fractions.gcd, numbers)


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ans  = (w*h)/2

if (x+x) == w and (y+y) == h:
    judge = 1
else:
    judge = 0
    
print(ans, judge)

Submission status: Accepted

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

print(S, can)

Submission status: Accepted

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


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

Submission status: Accepted

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

print(ma,boo)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w, h, x, y = map(int, input().split())
print(float(w) * float(h) / 2, 1 if (w == x + x) & (h == y + y) else 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
# import math
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)


    


W,H,x,y=l()

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

Submission status: Accepted

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

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

print(w*h/2,b)

Submission status: Accepted

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

area = (w*h/2)
c = 0

if (x == w/2) and (y == h/2):
    c = 1

print(area,c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

center = (W/2, H/2)

area = W*H

if (x, y) == center:
    print(area/2, 1)
else:
    print(area/2, 0)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h,x,y = map(int,input().split())
#必ず半分にできる…とはいえるのか？多分いえる。
#長方形の重心を通るようにひけばok.
ans = w*h/2
if x*2==w and y*2==h:
	print(ans, 1)
else:
	print(ans, 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys

input = iter(sys.stdin.read().splitlines()).__next__

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(W*H/2,a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(S, f)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans2,ans1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

if W%2==0 and x==W//2 and H%2==0 and y==H//2:
    print("{:.09f}".format(W*H/2),1)
else:
    print("{:.09f}".format(W*H/2),0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

pw = w/2
ph = h/2

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

Submission status: Accepted

Solution code:

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
w,h,x,y=n1()

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def intMap(): return map(int,input().split())

w,h,x,y = intMap()

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

print("{:.10f} {}".format(s,multi))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


def main():
    W, H, x, y = map(int, input().split())
    area = W * H / 2
    multi = int((x == W / 2) and (y == H / 2))

    print(area, multi)


if __name__ == '__main__':
    main()