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:
def solve(string):
    w, h, x, y = map(int, string.split())
    f = 1 if x == w / 2 and y == h / 2 else 0
    return str("{} {}".format(w * h / 2, f))


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
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()
ans = [0,0]
if w/2 == x and h/2 == y:
    ans[1] = 1
ans[0] = (w*h)/2
print(*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:
w, h, x, y = map(int, input().split())

area = w * h / 2

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

print(area, multiple)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
A = W*H/2
if X==W/2 and Y==H/2 :
    B=1
else:
    B=0
print(A,B)

Submission status: Accepted

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

W_harf=W/2
H_harf=H/2

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

Submission status: Accepted

Solution code:
#中心通れば半分になる
#指定された点が中心でないなら、二点を通る直線なので1通り
w,h,x,y = map(int, input().split())
b = w*h/2
if x*2==w and y*2 == h:
  c = 1
else:
  c = 0
print(b,c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import copy
import fractions
import numpy as np

# ===FUNCTION===

def getInputNum():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList

# ===CODE===

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

ans = w*h/2

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

print(ans, flg)

Submission status: Accepted

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

Submission status: Accepted

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

w,h,x,y = 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 2 * x == w or 2 * y == h:
    if 2 * x == w and 2 * y == h:
        judge = '1'
    else:
        judge = '0'
else:
    judge = '0'

print(s, judge)

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.0
flag = abs(x-W/2.0)<0.000001 and abs(y-H/2.0)<0.000001
print('{} {}'.format(area,1 if flag 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:
import sys
w,h,x,y = (int(i) for i in input().split())

ans1 = w * h / 2
ans2 = 0

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

print(ans1,end=" ")
print(ans2)

Submission status: Accepted

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

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

Submission status: Accepted

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

S=W*H/2
output='0'
if x==W/2 and y==H/2:
  output='1'
  
print(' '.join([str(S), output]))

Submission status: Accepted

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

if y == H / 2 and x == W / 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==w/2 and y==h/2 else 0)

Submission status: Accepted

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

Submission status: Accepted

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

area = W * H / 2
print(float(area))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
w, h, x, y = map(int, sys.stdin.readline().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(' '))
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())

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

Submission status: Accepted

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

    if 2*x == W and 2*y == H:
        return H*W/2, 1
    else:
        return H*W/2, 0

if __name__ == '__main__':
    # print(main())
    output = main()
    print(' '.join(map(str, output)))

Submission status: Accepted

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

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

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

Submission status: Accepted

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


"""考え方
下記の時のみ「最大の面積は全体の半分」、かつ「パターンが１つ」のみに決まる。
もし下記の両条件を満たしているときは「パターンは2つ」となる。

W/2 == x,
H/2 == y


それ以外の場合は「パターンは複数」となる。
また、最大の面積は、必ず全体の半分となる。


以上から、下記の事柄が導かれる。
・求める面積は、必ず全体面積の半分
・W/2==x,H/2==yの「どちらか１つだけ」の条件を満たしている場合は、パターンは1つ。それ以外の時は複数パターン存在する。
"""

area = (W*H) / 2.0

ck1 = False
if W/2 == x:
  ck1 = True

ck2 = False
if H/2 == y:
  ck2 = True

if ck1 and ck2:
  print(str(area)+ ' ' + '1')
else:
  print(str(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())
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())
center = 0
if x == W/2 and y == H/2:
    center = 1
print(W*H/2,center)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(S,ans)

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:
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:
#coding utf-8
W,H,x,y=map(int,input().split())

w=W/2
h=H/2

S=W*H/2
ans=0
if x==w and y==h:
  ans=1

print(S,ans)

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(float, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = map(float, 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())

area = w*h/2
temp = 0
# x,yが中心の場合は分割方法は２通りある
if x*2 == w and y*2 ==h:
  temp = 1

print(area,temp)

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(lambda x: int(x), input().split())

def is_eq(x, y):
    if abs(x-y) < 1e-9:
        return True
    else:
        return False

if is_eq(w/2, x) and is_eq(h/2, y):
    print("{} 1".format(w*h/2))
else:
    print("{} 0".format(w*h/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,x,y = 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())
s = float(w*h/2)
if x == (w/2) and y == (h/2):
  k = 1
else:
  k = 0
print(s,k)

Submission status: Accepted

Solution code:
def main():
    tmp = list(map(int, input().split(" ")))
    w = tmp[0]
    h = tmp[1]
    x = tmp[2]
    y = tmp[3]
    p = (x, y)
    if is_gusu(w) and is_gusu(h):
        center = (w // 2, h // 2)
    else:
        center = (-1, -1)

    if is_equal(p, center):
        print("{} 1".format(w*h / 2))
        return
    else:
        print("{} 0".format(w*h/2))


def is_equal(p, center):
    return p[0] == center[0] and p[1] == center[1]


def is_gusu(a):
    return a % 2 == 0


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions

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

res1 = w * h / 2

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

print(str(res1) + ' ' + str(res2))

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:
    f=1
else:
    f=0
print("{} {}".format(s,f))

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())
area=w*h/2
awee=0
if x==w/2 or y==h/2:
    awee=0
    if x==w/2 and y==h/2:
        awee=1
else:
    awee=0

print(str(area)+" "+str(awee))

Submission status: Accepted

Solution code:
# ABC 130 c
w, h, x, y = [int(el) for el in input().split(' ')]
s = w * h / 2
if x == w/2 and y == h/2:
    t = 1
else:
    t = 0
print('{} {}'.format(s, t))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

W,H,x,y=getints()

is_center = 2 * x == W and 2 * y == H
area = W * H / 2


print(area, 1 if is_center else 0)

Submission status: Accepted

Solution code:
w,h,x,y = map(float,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())
area=w*h*0.5

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

Submission status: Accepted

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

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

print("%f %d" %(w*h/2, k))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    w,h,x,y = map(int,input().split())
    if x + x == w and y + y == h:
        a = 1
    else:
        a = 0

    print("%f %d" %(w*h/2, a))

Submission status: Accepted

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

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

are=w*h/2
pat=0

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

print(are,pat)

Submission status: Accepted

Solution code:
W, H, x, y = map(int,input().split())
area = W*H/2
a = [1 if 2 * x == W and 2 * y == H else 0]
print(area, a[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 = "{0:.6f}".format(float(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 -*-
W, H, x, y = map(int, input().split())
Amax = W * H / 2
judge = 0

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

print(Amax, judge)

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
W, H, x, y = (int(i) for i 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:
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,math
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())
a=w*h/2
if w==x*2 and h==y*2:b=1
else:b=0
print(a,b)

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:
    m=1
else:
    m=0

print(s,m)

Submission status: Accepted

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

Submission status: Accepted

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

def maxArea(a, b):
    return a * b / 2

def isMultiple(a, b, x, y):
    return 1 if 2 * x == a and 2 * y == b else 0

def main():
    a, b, x, y = list(map(int, input().split()))
    print("{0} {1}".format(maxArea(a, b), isMultiple(a, b, x, y)))

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

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

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

Submission status: Accepted

Solution code:
[w,h,x,y]=[int(x) for x in input().split()]
a=(w*h)/2
if w%2==0 and h%2==0 and x==w/2 and y==h/2:
    print('%.6f'%a,1)
else:print('%.6f'%a,0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

w = W / 2
h = H / 2
e = 10 ** (-9)
flg = w - e <= x <= w + e and h - e <= y <= h + e

print(W * H / 2, int(flg))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
w, h, x, y = list(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 = [int(i) for i in 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 = [int(i) for i in 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(float, input().split())
print('{:.6f} {}'.format(float(w)*float(h)/2, int(x+x==w and y+y==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)
elif x==(w/2) or y==(h/2) or y==(h/w)*x or y==(-1*(h/w)*x+h):
    print((w*h)/2,0)
else:
    print((w*h)/2,0)

Submission status: Accepted

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

print("{:.9f}".format(area/2),end=" ")

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

Submission status: Accepted

Solution code:
temp=input().split()
W=int(temp[0])
H=int(temp[1])
x=int(temp[2])
y=int(temp[3])

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

Submission status: Accepted

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

center_x = w / 2
center_y = h / 2

if center_x == x and center_y == y:
    ans_b = 1
else:
    ans_b = 0

ans_a = w * h / 2

print('{} {}'.format(ans_a, ans_b))

Submission status: Accepted

Solution code:
def iread():
    return int(input())


def sread():
    return input()


def aread_int():
    tmp = input().split()
    ret = [int(i) for i in tmp]
    return ret


def aread_str():
    return input().split()


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w, h, x, y = list(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())
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 = (int(i) for i in input().split())  
if (w == 2*x) and (h == 2*y):
    print(str(0.5*w*h)+" "+str(1))
else:
    print(str(0.5*w*h)+" "+str(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 = [int(e) for e in input().split()]
area = (w*h)/2
ans = '1' if w==x*2 and h==y*2 else '0'
print(area, ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())
if c * 2 == a and d * 2 == 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())



if 2*x == w and 2*y == h:
    a = 1
else:
    a = 0
    
print("{} {}".format((w*h/2),a))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC130C
import sys


tmp = input().split()
hoge = list(map(lambda a: int(a), tmp))
w=hoge[0]
h=hoge[1]
x=hoge[2]
y=hoge[3]

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

Submission status: Accepted

Solution code:
import numpy as np

W, H, x, y = [int(x) for x in input().split(" ")]
max_area =  W * H / 2.0
eps = 1e-6
if x + x == W and y + y == H:
    flag = 1
else:
    flag = 0

print(max_area, flag)

Submission status: Accepted

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

main()

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

Submission status: Accepted

Solution code:
from copy import *
from sys import *
import math
import queue
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)

#s[i] is linked with t[len(s)-i-1]
def main():
	a,b,c,d = map(int,input().split())
	i = 1 if a/2 == float(c)  and b/2 == float(d) else 0
	print('{} {}'.format(a*b/2,i))


def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(m,n):
	x = max(m,n)
	y = min(m,n)
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	return y

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

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

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

print(str(ans1) + ' ' + str(ans2))

Submission status: Accepted

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

if x * 2 == w and y * 2 == h:
    print('{} 1'.format(w*h/2))
else:
    print('{} 0'.format(w*h/2))

Submission status: Accepted

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

mw, mh= (w/2, h/2)

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

Submission status: Accepted

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

Submission status: Accepted

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

exist = 0

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

print( W*H/2, exist )

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

Multi = 0

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

print('{} {}'.format(w*h/2,Multi))