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

Submission status: Accepted

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

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

print(str(A)+' '+str(m))

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
import sys
eps = sys.float_info.epsilon


def main():
    W, H, x, y = map(float, input().split())
    print(" ".join([str(W * H / 2), "1" if abs(W / 2 - x)
                    < eps and abs(H / 2 - y) < eps else "0"]))
    return


main()

Submission status: Accepted

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

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:
def slove():
    import sys
    input = sys.stdin.readline
    w, h, x, y = list(map(int, input().rstrip('\n').split()))
    if x * 2 == w and y * 2 == h:
        print(w * h / 2, 1)
    else:
        print(w * h / 2, 0)


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

W, H, x, y = map(int, input().split(" "))
print(W*H/2, func(W, H, x, y))

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

print(W*H/2,j)

Submission status: Accepted

Solution code:
w,h,x,y=map(int,input().split())
print('{} {}'.format(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(" "))

# 中心を通るか？
f = 0
if x == w/2 and y == h/2:
  f = 1

print("{} {}".format(w*h/2,f))

Submission status: Accepted

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

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 = map(int,input().split())
'''
horizon = min(W * y , W * (H - y))
vertical = min(H * x , H * (W - x))
# 直線上に存在すれば三角形の面積
if x == W or y == H or x == 0 or y == 0:
    print("{:.6f}".format((W * H) / 2) , end = ' ')
    print("0")
# 直線上にない時、長方形の面積
else:
    print('{:.6f}'.format(max(horizon , vertical)) , end = ' ')
    if horizon == vertical:
        print("1")
    else:
        print("0")
'''

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

L = list(map(int, input().split()))
if L[2] == L[0]/2 and L[3] == L[1]/2:
    print(L[0]*L[1]/2,1)
else:
    print(L[0]*L[1]/2, 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(W*H/2)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h,x,y = list(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 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())
A = min(x * H,(W - x) * H)
B = min(y * W,(H - y) * W)
print(W * H / 2,end=" ")
print(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 = 0
if w / 2 == x and h / 2 == y:
  s = 1
print('{:.6f}'.format(w * h / 2), s)

Submission status: Accepted

Solution code:
a = list(map(int, input().split())) 
ans = a[0]*a[1]/2
flag = 0
if a[0]/2 == a[2] and a[1]/2 == a[3]:
    flag = 1
print(ans,flag,sep=" ")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*-coding: utf-8 -*-
W, H, x, y = map(int, input().split())
s = W*H/2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lists=list(map(int,input().split()))
nums=lists[0]*lists[1]/2
if lists[0]==2*lists[2] and lists[1]==2*lists[3]:
    print(nums,1)
else:
    print(nums,0)

Submission status: Accepted

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

ans=W*H/2
exists=(0,1)[x==W/2 and y==H/2]

print(ans,exists)

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

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

print(area, multi)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
#ABC130C - Rectangle Cutting
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())
max_s = W*H/2
cnt = 0
if x*H == max_s:
    cnt += 1
if y*W == max_s:
    cnt += 1
if x*y/2 == max_s:
    cnt += 1

if cnt > 1:
    print(max_s, 1)
else:
    print(max_s, 0)

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

Submission status: Accepted

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

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


ans = (float(W)/2)*(float(H))

print('%f %i'%(ans,ans_b))

Submission status: Accepted

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

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())
menseki = W*H*0.5
fukusuu = int((x,y)==(0.5*W,0.5*H))
print(menseki,fukusuu)

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

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

Submission status: Accepted

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

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

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

ans = w * h / 2

print(str(ans) + ' ' + str(mulans))

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

Submission status: Accepted

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

Submission status: Accepted

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

print(str(w*h*0.5)+" ",end="")
if x==0.5*w and y==0.5*h:
    print("1")
else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

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

cent_x = w / 2
cent_y = h / 2

unique_flag = 0
if (cent_x == float(x)) & (cent_y == float(y)):
    unique_flag = 1

area = w * h / 2
print(str(area) + " " + str(unique_flag))

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
W,H,x,y=map(int,input().split())
ans=0

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

print(H*W/2,ans)

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(str(W*H/2) + " " +str(1))
else:
    print(str(W*H/2) + " " +str(0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left


INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LIM(): return list(map(lambda x:int(x) - 1, sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
mod = 1000000007


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

Submission status: Accepted

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

if x+x==w and y+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())

res = [0, 0]
res[0] = W * H / 2

if W / 2 == x and H / 2 == y:
    res[1] = 1

print(*res, sep=' ')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(): 
    
    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)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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:
#C - Rectangle Cutting(ABC130)
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())
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 abs(W/2 - x) <= 10**(-5) and abs(H/2 -y) <= 10**(-5):
    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 abs(x-W/2)<10**(-5) and abs(y-H/2)<10**(-5):
    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 w%2 == 0  and h%2 == 0 and w//2 == x and h//2 == y:
    way = '1'
else:
    way = '0'
print(s,way)

Submission status: Accepted

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

Submission status: Accepted

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

s = str(W * H / 2)
t = "1" if x * 2 == W and y * 2 == H else "0"

print(s + " " + t)

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
#if x*y == 0 or (x-W)*(y-H) ==0 or (x == W/2 and y != H/2) or (x != W/2 and y == H/2) :
#  print(str(W*H/2) + ' 0')
#  exit()
#elif y == H / W * x and x != W/2:
#  print(str(W*H/2) + ' 0')
#  exit()
#elif y == H - H / W * x and x != W/2:
#  print(str(W*H/2) + ' 0')
#  exit()
#print(str(W*H/2) + ' 1')

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

Submission status: Accepted

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

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

print(w*h/2,multi_flg)

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    W, H, x, y = list(map(int, input().split()))
    ans_area = W*H/2
    if x == W/2 and y == H/2:
        can_separate = 1
    else:
        can_separate = 0
    print("{} {}".format(ans_area, can_separate))


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
if x == W/2 and y == H/2:
    Flag = 1
else:
    Flag = 0
print("{0} {1}".format(W*H/2, 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:
while True:
    try:
        W, H, x, y = map(int, input().split())
        
        if (x*2 == W) and (y*2 == H):
            res = 1
        else:
            res = 0
            
        print("%.6f %d" % (W*H/2, res))
    except:
        break

Submission status: Accepted

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

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())
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:
  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(' '.join((str(W * H / 2.0), '1' if (W/2 == x) and (H/2 == y) else '0')))

Submission status: Accepted

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

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

res = [W * H / 2, 1 if x == W / 2 and y == H / 2 else 0]
print(*res, sep=' ')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 31 13:18:21 2019

@author: arute
"""

from sys import stdin
import itertools



############################################

# read data for n sequences.
temp = stdin.readline().split()
W = int(temp[0])
H = int(temp[1])
x = int(temp[2])
y = int(temp[3])

area = W*H/2

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

print(area, ans)

Submission status: Accepted

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

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

print(" ".join(list(map(str,ans))))

Submission status: Accepted

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

s = W * H / 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

"""
A=min(W-x,x)*H
B=min(H-y,y)*W

if(A==B):
    print(A,"1")
else:
    print(max(A,B),"0")

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

Submission status: Accepted

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

area = w * h / 2
multi = 0

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

print("{} {}".format(area, multi))

Submission status: Accepted

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

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

center = (w/2, h/2)

area = w*h/2

if x == center[0] and y == center[1]:
    print(area, 1)
else:
    print(area, 0)

Submission status: Accepted

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

# if W == H:
#     x = 1
# else:
#     x = 0

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

print(W * H / 2, x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,a,b =[int(i) for i in input().split()]
if (a,b) == (W/2,H/2):
    r = 1
else:
    r = 0
print((W*H)/2,int(r))

Submission status: Accepted

Solution code:
W,H,a,b =[int(i) for i in input().split()]
if a == W or b == H or a == 0 or b == 0:
    r = 0
elif a/W == b/H:
    r = 1
else :
    r = 0
print((W*H)/2,int(r))

Submission status: Accepted

Solution code:
import sys
from math import ceil

def input():
    return sys.stdin.readline().strip()

def iinput():
    return int(input())

def finput():
    return float(input())

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

def rinput():
    return map(int, tinput())

def rlinput():
    return list(rinput())

def nok(a, b):
    m = a * b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a + b)    


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

Submission status: Accepted

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

Submission status: Accepted

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

    print(s, multiline)



resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w, h, x, y = [float(x) for x in input().split(' ')]
print('{:.10f}'.format(w*h/2.0), 1 if (2*x==w and 2*y==h) else 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=input().split()
if int(x) == int(w)/2 and int(y) == int(h)/2:
    t = 1
else:
    t = 0
print(float(w)*float(h)/2, t)

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

ans = w * h / 2

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

print(str(ans) + " " + str(num))

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

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

else:
    print("{} 0".format(output))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
W, H, a, b = map(int, input().split())

print (W * H / 2, int(a == W - a and b == H - b))

Submission status: Accepted

Solution code:
def solve(string):
    w, h, x, y = map(int, string.split())
    f = 1 if 2 * x == w and 2 * y == h else 0
    return str("{} {}".format(w * h / 2, f))


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