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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
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())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
w, h, x, y = [int(elem) for elem in 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:
def main():
    w,h,x,y = map(int,input().split())
    flg = 0

    if x * 2 == w :
        flg +=1
    if y * 2 == h :
        flg +=1

    if x * h == w * y :
        flg += 1


    ans = max(w * y, h*x)
    if ans * 2 > w*h:
        ans = min(w*y,h*x)

    if flg > 1:
        print(w*h/2, 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(2*x == W and 2*y == H))

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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())

print(w*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())
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, 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 (2*x == w) & (2*y == h):
    print('{0} {1}'.format((w*h)/2,1))
    
else:
    print('{0} {1}'.format((w*h)/2,0))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(area, div)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans, count)

Submission status: Accepted

Solution code:
W,H,x,y=map(int,input().split())
print(str((H*W)/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())

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

print(ans, count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
W,H,X,Y = map(int,input().split())

ans1 = (W*H)/2
ans2 = 1 if X*2==W and Y*2==H else 0

print(ans1,ans2)

Submission status: Accepted

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

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

print(w*h/2, end = ' ')

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())

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

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
ans=0
if c==a/2 and d==b/2:
    ans=1
print(a*b/2, ans)

Submission status: Accepted

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

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:
    flg = 1
else:
    flg = 0
    
print(area, flg)

Submission status: Accepted

Solution code:


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

ans1 = float(W) * float(H) / 2
ans2 = 0
if x+x == W and y+y == H:
    ans2 = 1

print("{} {}".format(ans1, ans2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())

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

print(W*H*0.5, a)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

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

Submission status: Accepted

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

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:
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())
if(C+C==A and D+D==B):
  print(A*B/2, 1)
else:
  print(A*B/2, 0)

Submission status: Accepted

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

center = 0

if W/2 == x and H/2 == y :
  center = 1


print(W*H/2,center)

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(ans,1)
else :
    print(ans,0)

Submission status: Accepted

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

half = (w * h) / 2

ret = 0

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

print(half, ret)

Submission status: Accepted

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

Submission status: Accepted

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

from sys import stdin, stdout

w, h, x, y = map(int, stdin.readline().split())
ways = 0
if x * 2 == w and y * 2 == h:
    ways = 1
stdout.write("%.6F %d\n" % (w * h / 2, ways))

Submission status: Accepted

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

Submission status: Accepted

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

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:
mod = 10 ** 9 + 7
mod2 = 2 ** 61 + 1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

_NUMINT_ALL = list(range(10))


def main():
    ans = solve()
    if ans is not None:
        print(ans)


def solve():
    W, H, x, y = iip(False)

    s = W*H/2
    if x == W/2 and y == H/2:
        split_print_space([s, 1])
    else:
        split_print_space([s, 0])



#####################################################ライブラリ集ここから

def iip(listed=True, num_only=True):
    if num_only:
        ret = [int(i) for i in input().split()]
    else:
        ret = [int(i) if i in _NUMINT_ALL else i for i in input().split()]

    if len(ret) == 1 and not listed:
        return ret[0]
    return ret


def sort_tuples(l, index):
    if isinstance(l, list):
        l.sort(key=lambda x: x[index])
        return l
    else:
        l = list(l)
        return sorted(l, key=lambda x: x[index])


def count_elements(l):
    d = {}
    for i in l:
        if i in d:
            d[i] += 1
        else:
            d[i] = 1
    return d


def safeget(l, index, default="exception"):
    if index >= len(l):
        if default == "exception":
            raise Exception("".join(["safegetに不正な値 ", index, "が渡されました。配列の長さは", len(l), "です"]))
        else:
            return default
    elif index < 0:
        if default == "exception":
            raise Exception("".join(["safegetに不正な値 ", index, "が渡されました。負の値は許可されていません"]))
        else:
            return default
    else:
        return l[index]


def iipt(l, listed=False, num_only=True):
    ret = []
    for i in range(l):
        ret.append(iip(listed=listed, num_only=num_only))
    return ret


def sortstr(s):
    return "".join(sorted(s))


def iip_ord(startcode="a"):
    if isinstance(startcode, str):
        startcode = ord(startcode)
    return [ord(i) - startcode for i in input()]


def YesNo(s):
    if s:
        print("Yes")
    else:
        print("No")


def fprint(s):
    for i in s:
        print(i)


def bitall(N):
    ret = []
    for i in range(2 ** N):
        a = []
        for j in range(N):
            a.append(i % 2)
            i //= 2
        ret.append(a)
    return ret


def split_print_space(s):
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side="left"):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        # print(sorted_list)
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_=mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

Submission status: Accepted

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

xyplus = x + y
#重心に来る時は複数、線上と内部は1こ
# if w % 2 == 0 and h % 2 == 0:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w, h, x, y = map(int, input().split())
print('{} {}'.format(str(w*h/2), str(0 + (x == w/2 and y == h/2))))

Submission status: Accepted

Solution code:
import sys
import math

from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 
def prime_list(n):
    li = [i for i in range(2, n+1)]
    for i in range(len(li)):
        if li[i] >= int(math.sqrt(n)):
            break
        if li[i] == -1:
            continue
        for j in range(i+1, len(li)):
            if li[j] % li[i] == 0:
                li[j] = -1
    return [n for n in li if n != -1]
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while True:
        r = a % b
        if r == 0: return b
        a, b = b, r
def lcm(a, b):
    return int(a * b / gcd(a,b))
def all_subset(li):
    s = []
    n = len(li)
    for bit in range(0, (1<<(n+1))):
        ss = set()
        for i in range(0, n):
            if (bit & (1 << i)):
                ss.add(li[i])
        s.append(ss)
    return s
def factorial(n):
    if n == 1:
        return 1
    return n * factorial(n-1)
def mCn(m, n):
    def factorial_ntimes(m, n):
        r = 1
        while n:
            r *= m
            m -= 1
            n -= 1
        return r
    return int(factorial_ntimes(m, n) / factorial(n))

w,h,x,y = load_list()

print(w * h / 2, int(x+x == w and y+y == h))

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

Submission status: Accepted

Solution code:
W, H, X, Y = map(float, input().split())

c = W*H/2

if W/2==X and H/2==Y:
	print(c, 1)
else:
	print(c, 0)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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



resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print("{:.6f} {}".format(H*W/2, mul))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7

def main():
  w, h, x, y = map(int, readline().split())
  s = w*h/2
  if x==w/2 and y==h/2:
    ans = 1
  else:
    ans = 0
  print('{} {}'.format(s, ans))
  
  
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(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(x == W / 2 and y == H / 2))

Submission status: Accepted

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

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

Submission status: Accepted

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

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())
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())
max_area = w*h/2
flag = 0
if x == w/2 and y == h/2:
    flag = 1
print(max_area, flag)

Submission status: Accepted

Solution code:
h,w,x,y=map(int,input().split())
s=h*w/2
if h%2==0 and x==h//2 and w%2==0 and y==w//2:
  print(' '.join([str(s),'1']))
else:
  print(' '.join([str(s),'0']))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    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())
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, *xy = map(int, input().split())
print(w*h/2, ([w/2, h/2] == xy)+0)

Submission status: Accepted

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

answer = w*h/2
judge = 1 if w/2 == x and h/2 == y else 0

print(answer, judge)

Submission status: Accepted

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

print(area_max, yes_no)

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

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())

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

Submission status: Accepted

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

Submission status: Accepted

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

S = float(W*H/2)

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

Submission status: Accepted

Solution code:
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

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)

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

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def main():
  w, h, x, y = input_list()
  way = 0
  if w == 2*x and h == 2*y:
    way = 1
  print((w*h)/2, way)
  
import math
import fractions
import collections
import itertools
from functools import reduce
main()

Submission status: Accepted

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

area = W*H*0.5

if(W == x*2 and H == y*2):
    frac = "1"
else:
    frac = "0"

print(area, frac)

Submission status: Accepted

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

c_x = w / 2
c_y = h / 2

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

Submission status: Accepted

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

Submission status: Accepted

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

def ans(a, b, c, d):
    if (c == a / 2) and (d == b / 2):
        return 1
    else:
        return 0
        
print(W * H / 2,ans(W, H, x, y))

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())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import collections
from operator import mul
from functools import reduce

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

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

if flag==-1:
    flag=0
print("{0:.6f}".format(float(W*H/2)),flag)

Submission status: Accepted

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

ans = w * h / 2

multiple = 0

if x * 2 == w and y * 2 == h:
    multiple = 1

print("{} {}".format(ans,multiple))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(W * H / 2, mul)

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())
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())
print((w*h)/2 , 1) if 2*x==w and 2*y==h else print((w*h)/2,0)

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))


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

    W, H, x, y = il()
    print((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(float, input().split())
f = 0
if W / 2 == x and H / 2 == y:
    f = 1

print("{} {}".format(W*H/2, f))

Submission status: Accepted

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

flg = False
if w%2 == 0 and w//2 == x and h%2 == 0 and h//2 == y:
    flg = True

print(w * h / 2, 1 if flg else 0)

Submission status: Accepted

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

s = (W*H)/2
c = 0

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

Submission status: Accepted

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

c = 0

s = w*h/2

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

print(s,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:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
W,H,x,y = map(int,input().split())

surface = W * H
ans = [0,0]
if 2*x==W and 2*y==H:
    ans = [surface/2,1]
else:
    ans = [surface/2,0]

print(*ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
W,H,x,y = map(int,input().split())
if (2*x,2*y) == (W,H):
  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())
 
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 == 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())
center = (w/2, h/2)
ans2 = 1 if (x, y)==center else 0
ans1 = w*h/2
print(ans1, ans2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

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

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