Problem:


Score : 300 points

Problem Statement

There is a rectangle in a coordinate plane. The coordinates of the four vertices are (0,0), (W,0), (W,H), and (0,H).
You are given a point (x,y) which is within the rectangle or on its border. We will draw a straight line passing through (x,y) to cut the rectangle into two parts. Find the maximum possible area of the part whose area is not larger than that of the other. Additionally, determine if there are multiple ways to cut the rectangle and achieve that maximum.

Constraints

1 \leq W,H \leq 10^9

0\leq x\leq W

0\leq y\leq H

All values in input are integers.

Input

Input is given from Standard Input in the following format:

W H x y

Output

Print the maximum possible area of the part whose area is not larger than that of the other, followed by 1 if there are multiple ways to cut the rectangle and achieve that maximum, and 0 otherwise.

The area printed will be judged correct when its absolute or relative error is at most 10^{-9}.

Sample Input 1

2 3 1 2

Sample Output 1

3.000000 0

The line x=1 gives the optimal cut, and no other line does.

Sample Input 2

2 2 1 1

Sample Output 2

2.000000 1



Sample input:
2 3 1 2


Sample output:
3.000000 0

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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:
# -*- coding: utf-8 -*-
from decimal import Decimal
w,h,x,y = list(map(lambda x:Decimal(int(x)),input().split()))

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

Submission status: Accepted

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

  print('{:.10f} {}'.format(w * h / 2, int(x * 2 == w and y * 2 == h)))


if __name__ == '__main__':
  main()

Submission status: Accepted

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

middle_x = W / 2
middle_y = H / 2

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

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(format(A,'.6f'),1)
else:
    print(format(A,'.6f'),0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print('{:.6f}'.format(s), p)

Submission status: Accepted

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

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


b = 0

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

Submission status: Accepted

Solution code:
W,H,x,y = list(map(int,input().split()))
area = W*H/2.0
mx = W / 2.0
my = H / 2.0
if mx - x == 0 and my - y == 0:
    n = 1
else:
    n = 0
print('{} {}'.format(area,n))

Submission status: Accepted

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

area = w * h / 2

multiple = int((w/2 == x) and (h/2 == y))

print(area, multiple)

Submission status: Accepted

Solution code:
def main():
    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:
        P = 1
    else:
        P = 0
    print(S, P)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = [int(elem) for elem in 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 = [int(x) for x in input().split(' ')]
s = W * H / 2
i = 0
if 2*x == W and 2*y == H:
  i = 1
print(s, i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from decimal import Decimal
w,h,x,y = map(int, input().split())
if x==w/2 and y==h/2:
    print(Decimal(w*h/2).quantize(Decimal('0.000000')),1)
else:
    print(Decimal(w*h/2).quantize(Decimal('0.000000')),0)

Submission status: Accepted

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

area = W * H / 2

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

Submission status: Accepted

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


abc()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

v_bisect = (w%2==0) and (w//2==x)
h_bisect = (h%2==0) and (h//2==y)

print((w*h)/2, 1 if v_bisect and h_bisect else 0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
w,h,x,y = map(int,input().split())
#最大の面積を求める
ans = (w * h) /2
#xとy共に偶数かつ2で割った時の数値がx,yと同じになる場合1を出力するようにする
#それ以外は0を出力させる
if w / 2 == x and h / 2 == y:
  num = 1
else:
  num = 0
print(ans,num)

Submission status: Accepted

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

W = in1[0]
H = in1[1]
x = in1[2]
y = in1[3]

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

Submission status: Accepted

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

print(str(W*H/float(2))+" "+str(a))

Submission status: Accepted

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

ans =w*h/2

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

Submission status: Accepted

Solution code:
import sys
def wi(): return list(map(int, sys.stdin.readline().split()))
W, H, x, y = wi()
ans = (H * W) / 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())
i = int(W-x==x and H-y==y)
print(W*H/2,i)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

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

Submission status: Accepted

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

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

print((W*H)*(1/2),e)

Submission status: Accepted

Solution code:
import sys
import numpy as np


def main():
    w, h, x, y = [int(e) for e in input().split()]
    s = (w * h) / 2.0
    if x * 2 == w and y * 2 == h:
        print(s, 1)
    else:
        print(s, 0)


main()

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:
line = input()
numbers = line.split(" ")
w, h, x, y = int(numbers[0]), int(numbers[1]), int(numbers[2]), int(numbers[3])
area = float(w*h/2)
print(str(area), end=" ")
if x == w/2 and y == h/2:
  print("1")
else:
  print("0")

Submission status: Accepted

Solution code:
# coding: utf-8
#
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(H*W/2,end=" ")
if x==W/2 and y==H/2:
	print(1)
else:
	print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def resolve():
	w,h,x,y=map(int,input().split())
	cho=0
	if (w/2,h/2)==(x,y):
		cho=1
	print('{:.6f} {}'.format(w*h/2,cho))
resolve()

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(w * h / 2, flag)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
w, h, x, y = map(int, input().split())
ans = w * h / 2
num = 0
if x == w/2 and y == h/2:
    num = 1
print("{} {}".format(ans, num))

Submission status: Accepted

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

S=float((w*h))/2.0
judge = 0

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

print(str(S)+" "+str(judge))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc130c

a,b,x,y=map(int,raw_input().split())
if 2*x==a and 2*y==b:
 res=1
else:
 res=0
print 1.0*a*b/2,res

Submission status: Accepted

Solution code:
inp=list(map(int,input().split()))
if 2*inp[2]==inp[0] and 2*inp[3]==inp[1]:
  ans=1;
else:
  ans=0;
print('%.6f %d'%(inp[0]*inp[1]*0.5,ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
"""考え方
(x, y)と長方形の中心を両方通るような直線で分割すると、大きくない方の面積は全体の半分の面積。

・与えられた(x, y)が長方形の中心の場合、区切り方は無限にある。
・与えられた(x, y)が長方形の中心でない場合、一通りに求まる。
"""
def solve():
    W, H, x, y = list(map(int, input().split()))

    ans_area = W*H/2

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

print(w * h / 2.0)

if x == w / 2.0 and y == h / 2.0:
    print(1)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = map(int, 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:
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if w == 1 and h == 1:
    print(str(0.5) + " " + str(0))
    exit()

print(str(int(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())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(w*h/2)

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

Submission status: Accepted

Solution code:
s=list(map(int,input().split()))
a=0
a=s[0]*s[1]
a=a/2
b=0
c=0
b=s[0]/2
c=s[1]/2
if s[2]==b and s[3]==c:
  print("{0:.10f}".format(a),1)
else:
  print("{0:.10f}".format(a),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())
mid = [0.5*w,0.5*h]
ans = w*h/2
if x ==mid[0] and y == mid[1]:
    cnt = '1'
else:
    cnt = '0'
print(ans,cnt)

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

Submission status: Accepted

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

print("{0} {1}".format(ans, flg))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans1 = W*H/2

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

print(ans1,ans2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
	W, H, x, y = map(int, input().split())
	a = W*H/2
	p = 0
	if x==W//2 and y==H//2 and W%2==0 and H%2==0:
		p = 1
	print(" ".join([str(a), str(p)]))


if __name__ == '__main__':
	main()

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:
from sys import stdin

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

input = lambda: stdin.readline()
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(w, h, x, y):
    area = w*h / 2
    multiple = int((2*x == w) and (2*y == h))
    return (area, multiple)

w, h, x, y = map(int, input().split())
print("%f %d" % solve(w, h, x, y))

Submission status: Accepted

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

print(W*H/2,is_multiple_answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = map(int, raw_input().split())
# check whether (x, y) is center of gravity or not
flag = (2 * x == W) and (2 * y == H)
print("{0} {1}".format((W*H)/2.0, int(flag)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

surface = W * H / 2

is_multi = int(x == W / 2 and y == H / 2)

print(surface, is_multi)

Submission status: Accepted

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


W,H,x_0,y_0 = map(float, input().split())

S = "{0:.6f}".format(float(W*H/2))
if W == 2 * x_0 and H == 2 * y_0:
    print(S, 1)
else:
    print(S, 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

    print(ans1,ans2)
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

elif x == w/2 and y == h/2:
    print((w * h) / 2)
    print(1)

elif x != w/2 or y != h/2:
    print((w * h) / 2)
    print(0)

elif x != w/2 and y != h/2:
    print((w * h) / 2)
    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)
elif not x or not y:
    print(W*H/2,0)
elif x/W==y/H or x/W==(H-y)/H:
    print(W*H/2,0)
else:
    print(W*H/2,0)

Submission status: Accepted

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

print("{:f} {}".format(float(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())


if (W/2 == x) and (H/2 == y):# 中心の場合無限だから1
    print("{:.9f}".format(W*H/2),1)
else:
    print("{:.9f}".format(W*H/2),0)

Submission status: Accepted

Solution code:
W,H,x,y = map(int, input().split())
area = W*H/2
print(area, end=' ')
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())
if x*2!=w or y*2!=h: print(w*h*0.5,0)
else: print(w*h*0.5,1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans_1 = float(w) * float(h) / 2

ans_2 = 0
if x + x == w and y + y == h:
    ans_2 = 1
else:
    ans_2 = 0

print(ans_1, ans_2)

Submission status: Accepted

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

ans_2 = 0
if x + x == w and y + y == h:
    ans_2 = 1
else:
    ans_2 = 0

print(float(w) * float(h) / 2, ans_2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def solve():
    a, b, x, y = [int(i) for i in input().split()]

    print(a * b / 2, 1 if 2 * x == a and 2 * y == b else 0)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

# 指定された点を通る直線で長方形を分割する
# 分割した小さい方の面積を最大化するのは、直線が長方形の中心を通るとき
# つまり、指定された点と長方形の中心を結ぶ線
# すると、長方形をちょうど半分に分割できる
gx = W / 2
gy = H / 2

# 任意の2点を結ぶ直線の引き方は1通りだが
# 任意の1点を通る直線は無数に引ける
# 従って、分割方法が複数あるかどうかは、指定された点が中心点かどうか
is_multi = 1 if (x, y) == (gx, gy) else 0

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

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

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 = (int(i) for i in input().split())
if (w/2,h/2) == (x,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())
bigarea = W * H

j = (bigarea/2.000000)


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

print(j, k)

Submission status: Accepted

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

a = 0

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

print(W*H/2, a)

Submission status: Accepted

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

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

area = W * H / 2

print('{} {}'.format(area, res))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

j = (bigarea/2.000000)

# print('{:6f}'.format(bigarea/2))

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

# print(j, k)
# j = str(j)
print('{:6f} {:}'.format(j,k))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

area = W * H / 2

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

print(area, is_multi)

Submission status: Accepted

Solution code:
a, b, x, y = map(int, input().split())
ans = float(a)*float(b) / 2.0
if(x + x == a and y + y == b):
    num = 1
else:
    num = 0

print(ans, num)

Submission status: Accepted

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

if WC == x and HC == y:
    flag = 1

print(W*H/2,flag)

Submission status: Accepted

Solution code:
from decimal import *
import sys
W, H, x, y = map(int, input().split())
num = 0
if 2 * x == W and 2 * y == H:
    num = 1

print(W * H / 2, num)

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

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

print(ans,f)

Submission status: Accepted

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

Submission status: Accepted

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