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:
# using main() makes code faster from the point of view of "access to variables in global name-space"
# def main():

# for i, a in enumerate(iterable)
# q, mod = divmod(a, b)
# divmod(x, y) returns the tuple (x//y, x%y)
# manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
import sys
sys.setrecursionlimit(10**7)
from itertools import combinations, permutations # https://docs.python.org/ja/3/library/itertools.html
from math import factorial
def combinations_count(n, r):
    # faster than the following code
    # def combinations_count(n, r):
    #     return factorial(n) // (factorial(n - r) * factorial(r))
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
    return result
def combination_with_repetition_count(n, r):
    return combinations_count(n + r - 1, r)
from collections import deque, Counter # https://docs.python.org/ja/3/library/collections.html#collections.deque
from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
from operator import itemgetter # ex: List.sort(key=itemgetter(1))
from functools import reduce
from fractions import gcd # Deprecated since version 3.5: Use math.gcd() instead.
def gcds(numbers):
    return reduce(gcd, numbers)
def lcm(x, y):
    return (x * y) // gcd(x, y)
def lcms(numbers):
    return reduce(lcm, numbers, 1)

# first create factorial_list
# fac_list = mod_factorial_list(n)
INF = 10 ** 18
MOD = 10 ** 6 + 3
modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
def modinv(a, p = MOD):
    # evaluate reciprocal using Fermat's little theorem:
    # a**(p-1) is identical to 1 (mod p) when a and p is coprime
    return modpow(a, p-2, p)
def modinv_list(n, p = MOD):
    if n <= 1:
        return [0,1][:n+1]
    else:
        inv_t = [0,1]
        for i in range(2, n+1):
            inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
        return inv_t
def modfactorial_list(n, p = MOD):
    if n == 0:
        return [1]
    else:
        l = [0] * (n+1)
        tmp = 1
        for i in range(1, n+1):
            tmp = tmp * i % p
            l[i] = tmp
        return l
def modcomb(n, k, fac_list = [], p = MOD):
    # fac_list = modfactorial_list(100)
    # print(modcomb(100, 5, modfactorial_list(100)))
    from math import factorial
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    if len(fac_list) <= n:
        a = factorial(n) % p
        b = factorial(k) % p
        c = factorial(n-k) % p
    else:
        a = fac_list[n]
        b = fac_list[k]
        c = fac_list[n-k]
    return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
def modadd(a, b, p = MOD):
    return (a + b) % MOD
def modsub(a, b, p = MOD):
    return (a - b) % p
def modmul(a, b, p = MOD):
    return ((a % p) * (b % p)) % p
def moddiv(a, b, p = MOD):
    return modmul(a, modpow(b, p-2, p))


# initialize variables and set inputs
#initialize variables
    # to initialize list, use [0] * n
    # to initialize two dimentional array, use [[0] * N for _ in range(N)]
# set inputs
    # open(0).read() is a convenient method:
    # ex) n, m, *x = map(int, open(0).read().split())
    #     min(x[::2]) - max(x[1::2])
    # ex2) *x, = map(int, open(0).read().split())
    #     don't forget to add comma after *x if only one variable is used
# calculate and output
    # output pattern
    # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6

# set test data
# sys.stdin = open('sample.txt') # for test

# functions used
r = lambda: sys.stdin.readline().strip() #single: int(r()), line: map(int, r().split())
R = lambda: list(map(int, r().split())) # line: R(), lines: [R() for _ in range(n)]
Rmap = lambda: map(int, r().split())
# set inputs

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

# if __name__ == '__main__':
#     main()

Submission status: Accepted

Solution code:
W,H,X,Y = map(int,input().split())
print(W * H / 2, 0 if W / 2 != X or H / 2 != Y else 1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
w, h, x, y = map(int, input().split())

ans_surface = w * h / 2

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

print(ans_surface, ans_multiple)

Submission status: Accepted

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

res_1 = W * H / 2
if x == W // 2 and y == H // 2 and W % 2 == 0 and H % 2 == 0:
    res_2 = 1
else:
    res_2 = 0

print(res_1, res_2)

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:
    p = 1

else:
    p = 0

print(ans, p)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
whxy = list(map(int, list(input().split())))

w = whxy[0]
h = whxy[1]
x = whxy[2]
y = whxy[3]

s = w * h / 2

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

print(s, yesno)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    W, H, x, y = map(int, input().split())
    print('{} {}'.format(W * H * 0.5, '1' if x == W * 0.5 and y == H * 0.5 else '0'))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
list = input().split()
w = float(list[0])
h = float(list[1])
x = float(list[2])
y = float(list[3])
if w/2==x and h/2==y:
  i=1
else:
  i=0
print("%f %d" %(w*h/2, i))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())


W,H,x,y=LI()

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

Submission status: Accepted

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

print(H*W/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())

area=w*h*0.5
if x==w/2 and y==h/2:
    plu=1
else:
    plu=0

print(area,plu)

Submission status: Accepted

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

#     l[0] = W - x
#     l[1] = x
#     l[2] = H - y
#     l[3] = y
    #l.clear(0)
    
    print(W*H*0.5 ,0)

Submission status: Accepted

Solution code:
line = input().split()
w = int(line[0])
h = int(line[1])
x = int(line[2])
y = int(line[3])

s = w * h /2

if w/2 == x and h/2 == y:
    another = 1
else:
    another = 0
    
print(str(s) + ' ' + str(another))

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:
  ans=1
else:
  ans=0
print(W*H/2,ans)

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

m2 = W * H * 0.5
ptn = 1 if W / 2 == x and H / 2 == y else 0

print(m2, ptn)

Submission status: Accepted

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

print(area,dou)

Submission status: Accepted

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

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

print(w * h / 2, c)

Submission status: Accepted

Solution code:
import sys

W, H, x, y = list(map(int, sys.stdin.readline().strip().split(" ")))
b = 0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

def main():
    a=inputList()
    w,h,x,y=a[0],a[1],a[2],a[3]

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

    print(str(ans)+" "+str(judge))

def inputList():
    a=list(map(int,input().split()))
    return a

def multisort(li,index):
    return sorted(li,key=lambda x: x[index])

if(__name__=='__main__'):
    main()

Submission status: Accepted

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

area = (W * H) / 2
f = 0

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

print("{0} {1}".format(area, f))

Submission status: Accepted

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

Submission status: Accepted

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

s = w * h / 2
flag = 1 if x == w / 2 and y == h / 2 else 0

print(s, flag)

Submission status: Accepted

Solution code:
def main():
    n = [int(i) for i in input().split()]
    ans = 0
    if n[0]/2 == n[2] and n[1]/2 == n[3]:
        ans = 1
    print((n[0]*n[1])/2, ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print((H * W) / 2, end=" ")

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

Submission status: Accepted

Solution code:
def main():
    data = input().split()
    S = float(data[0]) * float(data[1]) / 2
    center = [float(data[0]) / 2, float(data[1]) / 2]
    plot = [float(data[2]), float(data[3])]
    if plot == center:
        print(S, 1)
    else:
        print(S, 0)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

x1, x2 = max(x, W - x), min(x, W - x)
y1, y2 = max(y, H - y), min(y, H - y)

S = W * H / 2
flag = (x1 == x2) and (y1 == y2)
v = 1 if flag else 0

print('{} {}'.format(S, v))

Submission status: Accepted

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

a = w*h/2
b = 0

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

print(a,b)

Submission status: Accepted

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

print(W*H/2, end=" ")

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())
S = W*H/2
print(S, int(W % 2 == 0 and H % 2 == 0 and W//2 == x and H//2 == y))

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

if __name__ == '__main__':
    Solution().main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC130C - Rectangle Cutting
w, h, x, y = list(map(int, input().rstrip().split()))
area = w * h * 0.5
if (x, y) == (w * 0.5, h * 0.5):
    print(area, 1)
else:
    print(area, 0)

Submission status: Accepted

Solution code:
# coding: utf-8
w,h,x,y = [int(i) for i in input().split()]
print(w*h/2,end = "")
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().strip().split(' '))
print('{} {}'.format(W*H/2 ,int(x*2==W and y*2==H)))

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

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

print(W*H/2, anscnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

if (w / 2 == x) and (h / 2 == y):
    chk = 1
else:
    chk = 0

print((w * h)/2, chk)

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

Submission status: Accepted

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

Submission status: Accepted

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

area = (W * H) / 2

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

Submission status: Accepted

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

area = W * H / 2
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())

s = W * H / 2

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

print("{} {}".format(s, dif))

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
# import math
# import random
# import fractions
# import sys
# sys.setrecursionlimit(100000)
# N = int(stdin.readline().rstrip().split()[0])
# A = [int(x) for x in stdin.readline().rstrip().split()]
# N, X = [int(x) for x in stdin.readline().rstrip().split()]
# S = stdin.readline().rstrip().split()[0]

W, H, x, y = [int(x) for x in stdin.readline().rstrip().split()]
S = W*H/2
frag = 0
if W==2*x and H==2*y:
  frag=1

print(S,frag)

Submission status: Accepted

Solution code:
w,h,x,y = map(int,input().split())
flag = 0
ans = float(w)*float(h)/2.000000

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

Submission status: Accepted

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

ans_s = W*H/2
ans_b = 0

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

print(ans_s,ans_b)

Submission status: Accepted

Solution code:
W,H,x,y = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

s= float(W/2*H)

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

print(s,a)

Submission status: Accepted

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

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*(x==w/2 and y==h/2))

Submission status: Accepted

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

ans = W * H / 2

ans_s = 0

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

print(ans,ans_s)

Submission status: Accepted

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

result2 = 0
if ( W % 2 == 0 and H % 2 == 0) and ( int(W / 2) == x and int(H / 2) == y):
    result2 = 1

print(result1, result2)

Submission status: Accepted

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

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

area = w * h / 2

print(area, f)

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

Submission status: Accepted

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

menseki = W * H / 2
if x == W / 2 and y == H / 2:
    houhou = 1
else:
    houhou = 0

print(menseki, houhou)

Submission status: Accepted

Solution code:
W, H, x, y = map(int, raw_input().split())
mul = 0
if x*2 == W and y*2 == H:
    mul = 1
A = W * H / 2.0
print '%f %d' % (A, mul)

Submission status: Accepted

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

area = W * H
center = x * 2 == W and y * 2 == H

print('{} {}'.format(area / 2, 1 if center else 0))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans1 = (W * H / 2)

print(ans1, ans2)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    W, H, x, y = LI()
    if x == W/2 and y == H/2: # 小数だいじょうぶ？→入力は全て整数なので大丈夫っぽい。
        multiple_answers = 1
    else:
        multiple_answers = 0
    ans = W * H / 2

    print(ans, multiple_answers)

main()

Submission status: Accepted

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

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:
#  --*-coding:utf-8-*--


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

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



if __name__ == '__main__':
    main()

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

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
sys.setrecursionlimit(10 ** 7)


def LI(): return [int(x) for x in sys.stdin.readline().split()]


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


if __name__ == "__main__":
    main()

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, 1)
else:
    print(ans, 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())
#print(W,H,x,y)

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

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

print(S, ans)

Submission status: Accepted

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

ans = w*h/2
ans2 = 0

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

print(ans,ans2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
W, H, x, y = map(int, input().split())
min_max = W * H / 2
if x == (W / 2) and y == (H / 2):
  multi_point = 1
else:
  multi_point = 0
print("{} {}".format(min_max, multi_point))

Submission status: Accepted

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

Submission status: Accepted

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

S = W * H / 2
multi = int(x * 2 == W and y * 2 == H)
print("{} {}".format(S, multi))

Submission status: Accepted

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

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

SQR = W*H

H_SQR = SQR/2

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

Submission status: Accepted

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

Submission status: Accepted

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

x0, y0 = W / 2, H / 2
ans = W * H / 2

if (x0, y0) == (x, y):
    print(ans, 1)
else:
    print(ans, 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 and w%2 == 0 and h%2 == 0:
    print(s,1)
else:
    print(s,0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h,x,y =map(int, input().split())
men=w*h
bun1=x*h
bun2=(w-x)*h
bun3=w*y
bun4=w*(h-y)
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())
Gx = w/2
Gy = h/2
n = 0
if x == Gx and y == Gy:
    n = 1
S = w * h / 2
print(S,n)

Submission status: Accepted

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

min_max = W * H / 2
if W/2 == x and H/2 == y:
    multi_pattern = 1
else:
    multi_pattern = 0

print(min_max, multi_pattern)

Submission status: Accepted

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


def solve(W: int, H: int, x: int, y: int):
    r1 = W*H /2
    if W*y == H*x and W*y == -H*x+H*W:
        r2 = 1
    else:
        r2 = 0
    print(r1, r2)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    W = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    y = int(next(tokens))  # type: int
    solve(W, H, x, y)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
ll= lambda : list(map(int,input().split()))
testcases=1
# testcases=int(input())
for testcase in range(testcases):
	[w,h,x,y]=ll()
	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 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())
s = W*H/2
if (x,y) == (W-x,H-y):
    mul = 1
else:
    mul = 0
print(s,mul)

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 = float(W)*float(H)/2.0
if W/2 == x and H/2 == y:
	k = 1
else:
	k = 0
print(str(S) + " " + str(k))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

area = w * h / 2.0
if x == w / 2.0 and y == h / 2.0:
	print("{} {}".format(area, 1))
else:
	print("{} {}".format(area, 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.0,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())

s = 0.5 * w * h
has_multi = 0

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

print(s, has_multi)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import bisect
from datetime import datetime as dt
import bisect
import math

def gcd(a, b):
    return math.gcd(a, b)

def lcm(a, b):
    return a * b / gcd(a, b)

class slist(list):
    def __init__(self, *args, **kw):
        list.__init__(self, *args, **kw)
        self.sort()

    def append(self, value):
        bisect.insort(self,value)

    def index_left(self, value):
        return bisect.bisect_left(self, value)


if __name__ == '__main__':
    W, H, x, y = map(float, input().split())
    if x == W / 2.0 and y == H / 2.0:
        print('{0} {1}'.format(W * H / 2.0, 1))
    else:
        print('{0} {1}'.format(W * H / 2.0, 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

D=[0]

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