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

side = (x == 0 or x == w or y == 0 or y == h \
    or y/x == h/w or y == -h/w * x + h \
    or x != w/2 or y != h/2) \
    and not (x == w/2 and y == h/2)
area = w * h

print(area/2, int(not side))

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

Submission status: Accepted

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

print("{:.5f}".format(Decimal(W) * Decimal(H) / Decimal(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())
S=w*h/2
print(S, 1 if x*2==w and y*2==h else 0 )

Submission status: Accepted

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

Submission status: Accepted

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

possibility = "0"

if x == (W / 2) and y == (H / 2):
  possibility = "1"
  
max = str(W * H / 2)

print(max,possibility)

Submission status: Accepted

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


    ans = w * h / 2
    hasDivision = 1 if x + x == w and y + y == h else 0

    print(ans, hasDivision)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

# 最大はちょうど半分に切ったとき = x, yがどこにあっても中心を通ればちょうど半分
s = W * H / 2
# x, yが中心の時は無限に切り方がある
if W / 2 == x and  H / 2 == y:
    w = 1
else:
    w = 0

print(s, w)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = W * H / 2

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

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

Submission status: Accepted

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

S = W*H/2
flag = 0

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

Submission status: Accepted

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

S = W * H / 2
flag = 0
if x == W / 2 and y == H / 2:
    flag = 1

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import _collections
import string
from functools import lru_cache

class cin():
    def int():
        return int(sys.stdin.readline().rstrip())
    def string():
        return sys.stdin.readline().rstrip()
    def mapInt():
        return [int(x) for x in cin.string().split()]
    def stringList(n):
        return [input() for i in range(n)]
    def intListList(n):
        return [cin.mapInt() for i in range(n)]
    def intColsList(n):
        return [int(input()) for i in range(n)]
        
class Math():
    def gcd(a,b):
        if b == 0:
            return a
        return Math.gcd(b,a % b)
    def roundUp(a,b):
        return -(-a // b)
    def toUpperMultiple(a,x):
        return Math.roundUp(a,x) * x
    def toLowerMultiple(a,x):
        return (a // x) * x
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

MOD = int(1e09) + 7

def main():
    W,H,X,Y = cin.mapInt()
    print(float(W) * float(H) * 0.5,"01"[X * 2 == W and Y * 2 == H])
    return

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 最初に入れておくとinputが早くなる
import sys
input = sys.stdin.readline

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)
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())
FLAG = '0'

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

answer = (W / 2) * H
print(answer, FLAG)

Submission status: Accepted

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

print(kotae,hantei)

Submission status: Accepted

Solution code:
W,H,x,y = map(int,input().split(" "))
ans = (H*W)/2
time = int(bool(x+x == W and y+y == H))
print(str(ans)+' '+str(time))

Submission status: Accepted

Solution code:
mi = lambda : map(int, input().split())

w, h, x, y = mi()

s = w*h

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

print(*[s/2, hantei])

Submission status: Accepted

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

area = ( W * H ) / 2

'''
b = (H -W + 2*x - 2*y ) / 2

if 0 <= H + x -y -b and H + x - y - b <= H and 0 <= x - y - b and x - y - b <= H:
    if 0 <= W - x + y + b and W -x + y + b <= W and 0 <= y - x + b and y - x + b <= W:
        print(area,1)
    else:
        print(area,0)
else:
    print(area,0)
'''

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

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

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:
whxy=list(map(int,input().split()))
if whxy[0]==whxy[2]*2 and whxy[1]==whxy[3]*2:
  print(whxy[2]*whxy[3]*2,1)
else:
  print(whxy[0]*whxy[1]/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())
ans=w*h/2
a=0
if x==w/2 and y==h/2:
	a=1
print(ans,a)

Submission status: Accepted

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

Submission status: Accepted

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


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:
    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
half = area / 2

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

print(half, ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
 
def main():
    W, H, x, y = map(int, input().split())
 
    area = W * H / 2
 
    cenx = W / 2
    ceny = H / 2
 
    if x == cenx and y == ceny:
        print(area, '1')
    else:
        print(area, '0')
 
main()

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

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

print(w*h/2,ans)

Submission status: Accepted

Solution code:
# import itertools
# import math


def solve(W, H, x, y):
    area = W * H
    half_line_count = 0
    if (W / 2) == x and (H / 2) == y:
        half_line_count = 1
    return [area / 2, half_line_count]


# N = int(input())
# S = input()
W, H, x, y = map(int, input().split())
# A = list(map(int, input().split()))

# P = []
# S = []
# for i in range(N):
#     pp, ss  = map(int, input().split())
#     P.append(pp)
#     S.append(ss)

print(*solve(W, H, x, y))

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

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

Submission status: Accepted

Solution code:
#2つの長方形，ではない
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())
cg = [W/2, H/2]
if [x, y] == cg:
    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+x==W and y+y==H:
    ans=1
else:
    ans=0

print(str('{:.10f}'.format(S))+' '+str(ans))

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
import sys
input = sys.stdin.readline

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

    area = W * H / 2

    cenx = W / 2
    ceny = H / 2

    if x == cenx and y == ceny:
        print(area, '1')
    else:
        print(area, '0')

main()

Submission status: Accepted

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

Submission status: Accepted

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

area=w*h/2
count=0
if w/2==x and h/2==y:
    count=1
print('{:.10f} {}'.format(area,count))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, u, v = map(int, input().split())
ans = []
ans.append(W * H / 2)
ans.append(int(2 * u == W and 2 * v == H))
print(*ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


method = "0"
if x + x == W and y + y == H:
    method = "1"


ans = H * W / 2
print(ans, method)

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 = [int(i) for i in input().split()]
s = w * h / 2
if x*2 == w and y*2 == h:
    v = 1
else:
    v = 0
print(s, v)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

w = W/2
h = H/2

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

Submission status: Accepted

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

    men = W * H / 2
    flag = (x + x == W) & (y + y == H)

    return(men, flag)
    
if __name__ == '__main__':
    men, flag = main()
    print(men, int(flag))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(W*H/2, flag)

Submission status: Accepted

Solution code:
W,H,x,y = map(int,input().split())
dup = W/2 == x and H/2 == y
print('{0:.12f} {1:d}'.format(W*H/2, dup))

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
result = 0
if x == W/2 and y == H/2:
    result = 1
print(" ".join([str(item) for item in [(W*H)/2,result]]))

Submission status: Accepted

Solution code:
def calculate(w,h,x,y):

    b = 0
    if (x - w/2 == 0) and (y - h/2 == 0):
        b = 1


    arr = [w*h/2,b]
    print(" ".join([str(item) for item in arr]))


arr = input().split(" ")
W = int(arr[0])
H = int(arr[1])
x = int(arr[2])
y = int(arr[3])

calculate(W,H,x,y)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(str(w * h / 2) + ' ' + str(center))

Submission status: Accepted

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

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

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:
from __future__ import print_function

import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

# import math
# import string
# import fractions
# from fractions import Fraction
# from fractions import gcd

# def lcm(n,m):
#     return int(n*m/gcd(n,m))

# import re
# import array
# import copy
# import functools
# import operator

# import collections
# import itertools
# import bisect
# import heapq


# from heapq import heappush
# from heapq import heappop
# from heapq import heappushpop
# from heapq import heapify
# from heapq import heapreplace

# from queue import PriorityQueue as pq

# def reduce(p, q):
#     common = fractions.gcd(p, q)
#     return (p//common , q//common )
# # from itertools import accumulate
# # from collections import deque

# from operator import mul
# from functools import reduce

# def combinations_count(n, r):
#     r = min(r, n - r)
#     numer = reduce(mul, range(n, n - r, -1), 1)
#     denom = reduce(mul, range(1, r + 1), 1)
#     return numer // denom

# import random

def main():
    w,h,x,y = map(int, input().strip().split())
    print(w*h/2,end=" ")
    if float(w/2)==float(x) and float(h/2)==float(y):
        print(1)
    else:
        print(0)

    
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = W * H / 2

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

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

w,h,x,y = LI()

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

ans = w*h/2
print(ans,flg)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
w, h, x, y = [int(i) for i in sys.stdin.readline().split()]
n = 1 if w / 2 == x and h / 2 == y else 0
print(w * h / 2, n)

Submission status: Accepted

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

S = W*H
if W==2*x and H==2*y:
    print(S/2, 1)
else:
    print(S/2, 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:
#ABC-130-C
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:
w,h,x,y=map(int,input().split())
if x==w/2 and y==h/2:
    print(h*w/2, end=" ")
    print(1)
else:
    print(h*w/2, end=" ")
    print(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 W / 2 == x and H / 2 == y:
    print(W * H / 2, 1)
else:
    print(W * H / 2, 0)

Submission status: Accepted

Solution code:
a,b,x,y=map(int,input().split())

tx=a/2
ty=b/2

print(a*b/2,end= " ")
if(tx==x and ty==y):
    print("1")
else:
    print("0")

Submission status: Accepted

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


def solve(W: int, H: int, x: int, y: int):
    print(W*H/2,int(W/2 == x and H/2== y))
    return


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:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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





if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans1 = w*h/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())

cx = W / 2
cy = H / 2

s = W * H / 2.0
if x == cx and y == cy:
    print(s, 1)
else:
    print(s, 0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

ans = (w * h) / 2.0
flag = 0

if ((w / 2.0) == x) and ((h / 2.0) == y):
    flag = 1

print(ans, 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,sep=' ')
else:
    print(w*h/2,0,sep=' ')

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    X, A= LI()
    
    if(X >= A):
        print(10)
    elif(X<A):
        print(0)
    return

# B


def B():
    N, X= LI()
    L=LI()
    
    ans=1
    D=0
    for i in range(1,N):
        D=D+L[i]
        if (D>X):
            break
        ans+=1
    print(ans)
    


    
    return

# C


def true():
    S = input()
    S = S[:-1]

    tmp = 0
    for x in range(1 << (len(S)-1)):
        func = S[-1]
        for i in range(len(S)-1):
            if(x & (1 << i)):
                tmp += int(func)
                func = S[-2-i]
            else:
                func = S[-2-i]+func
        tmp += int(func)
    print(tmp)

    return


def flagcounter(x):
    if (x == 0):
        return 0
    return flagcounter(x >> 1)+(x & 1)


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

    return


# D


def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':

    C()

Submission status: Accepted

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

centerx = w/2
centery = h/2

if(centerx == x and centery == y):
    print((w*h)/2)
    print("1")
else:
    print((w*h)/2)
    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())
M=W*H/2
if x==W/2 and y==H/2:
    print(str(M)+' '+str(1))
else:
    print(str(M)+' '+str(0))

Submission status: Accepted

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

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

print(half, ans)

Submission status: Accepted

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

half = W * H / 2
flag = 1 if x == W/2 and y == H/2 else 0

print(half,flag)

Submission status: Accepted

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

	ans_2 = 0
	
	if w % 2 != 0 or h % 2 != 0:
		ans_2 = 0
	elif w % 2 == 0 and h % 2 == 0 and w / 2 == x and h / 2 == y:
		ans_2 = 1

	ans_1 = (w*h) /2

	print(ans_1, ans_2)

if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
ans=[w*h/2]
if (x==0 and y==0) or (x==0 and y==h) or (x==w and y==0) or (x==w and y==h):
    ans.append(0)
elif y*w==x*h or y*h==x*w:
    ans.append(1)
else:ans.append(0)
print(*ans)