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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)

W, H, x, y = LI()

'''
どこの点が与えられても、縦、横、四隅の点とむすんで面積を確認する
対角で面積が同じ場合は、2分割を意味する
正方形の場合、絶対半分にでき、原点の場合は複数個線を作れる

長方形の場合、原点の場合は複数個可能で、それ以外の場合は無理
'''

if W == H:
    # 正方形の場合
    print(W*H/2, end=' ')
    if x == y == W/2:
        print(1)
    else:
        print(0)
else:
    # 正方形以外の場合
    if x == W/2 and y == H/2:
        print(W*H/2, 1)
    else:
        #  # 中途半端な位置の点のばあい
        #  # 4隅と縦横を調査
        #  S = W*H
        #  # 縦の場合
        #  s1 = x*H
        #  s2 = S - s1
        #  sm = min(s1, s2)

        #  # 横の場合
        #  s1 = W*y
        #  s2 = S - s1
        #  sm = max(sm, min(s1, s2))
        #  print(sm, 0)

        # どんなところからでも二等分可能
        print(W*H/2, 0)

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
print(a*b/2.0,int((a==c*2)&(b==d*2)))

Submission status: Accepted

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

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
w,h,x,y = map(int, input().split())
s = w / 2 * h 
num = 0
if x == w/2 and y == h/2:
    num = 1
    
print('%.6f'%s,end=' ')
print(num)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
if x*2 == W and y*2 == H: c = 1
else: c = 0
print("%.6f %d" % (float(W*H/2),c))

Submission status: Accepted

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

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



print(w*h/2, b)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if x==0.5*W and y==0.5*H:
  z2 = 1
else:
  z2 = 0

print(z1,z2)

Submission status: Accepted

Solution code:
def C_RectangleCutting():
    W,H,x,y = map(int, input().split())
    print(0.5*W*H, 1*((0.5*W == x) and (0.5*H == y)))
    
if __name__ == "__main__":
    C_RectangleCutting()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
W,H,x,y = [int(s) for s in input().split()]
if(2*x==W and 2*y==H):
  print(2*x*y,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:
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:
a,b,c,d=map(float,input().split())
if a/2==c and b/2==d:
  y=1
else:
  y=0

  
print(str((a*b)/2)+" "+str(y))

Submission status: Accepted

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

Submission status: Accepted

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



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

print(W*H/2,j)

Submission status: Accepted

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

Submission status: Accepted

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

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

    # 面積の大きくない方の最大値って面積の半分のことじゃね？
    area_ans = W*H/2

    # x,yが長方形の重心にあるなら無限の直線で分割できる(1)
    # そうでないなら、たった一本が存在する？

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
W, H, x, y = tuple([int(s) for s in input().split()])
S = W * H / 2
flag = 1 if (W % 2 == 0 and H % 2 == 0 and W // 2 == x and H // 2 == y) else 0
print("{0} {1}".format(S, flag))

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

# 面積の大きくない方の最大値
area_max = (W * H) / 2

# x, yが長方形の中心なら分割の方法が複数ある
divide = 1 if (x == W/2 and y == H/2) else 0

print(area_max, divide)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

area = W*H/2

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

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

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:
a, b, c, d = map(int, input().split())
if a == c * 2 and b == d * 2:
    print(str(a * b / 2) + " 1")
else:
    print(str(a * b / 2) + " 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.0, 1)
else:
  print(w*h/2.0, 0)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

area1 = (w - x) * h
area2 = w * (h - y)

ans = w * h /2
tf = 0
if x * 2 == w and y * 2 == h:
    tf += 1

print(ans, tf)

Submission status: Accepted

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

s = w * h / 2

if x/w == y/h == 0.5:
    print(str(s) + " 1")
else:
    print(str(s) + " 0")

Submission status: Accepted

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

Submission status: Accepted

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

def main():
	W, H, x, y = map(int, (input().strip().split()))
	if W/2 == x and H/2 == y:
		i = 1
	else:
		i = 0
	print("{:.9f} {}".format(W*H/2, i))


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = list(map(int, input().split()))
# L = list(map(int, input().split()))
# S = [list(map(int, input().split())) for i in range(n)]

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

print(ans, many)

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:
# もし周上にあれば必ず面積は元の半分位にできる。
# その時の分割方法は、対角頂点の同じだけの距離の場所なので、１通り
# 長方形内にある時、長方形の中心点を通ることができるならば、かならず半分にできる。
# また、中心点を通らないと半分にはできない。
# つまり、中心点h/2,w/2にx,yがある時のみ1、それ以外は0
def main():
  h,w,x,y =map(int,input().split())
  if h/2 == x and w/2 == y:
    print(h*w/2,1)
  else:
    print(h*w/2,0)
main()

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:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
W,H,x,y = map(float, input().split())
print("{0} {1}".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 == W / 2) & (y == H / 2):
    c = 1
else:
    c = 0

print(W * H / 2, c)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import Fraction
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def judge(a,c,d):
  x = a//c
  y = a//d
  z = a//lcm(d,c)
  return a-x-y+z


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=input().split()
a=[int(i) for i in a]

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

max=round(W*H*0.5,9)
print(max)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

print(W*H/2, check)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[1]:


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


# In[2]:


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


# In[ ]:

Submission status: Accepted

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

max = W*H/2

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

print(max,judge)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

max_S = W * H / 2
hukusu = 1 if x == W / 2 and y == H / 2 else 0

print(max_S, hukusu)

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

print(m,ans)

Submission status: Accepted

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

area = w * h / 2
is_point_center =  w/2 == x and h/2 == y
is_multiple = "1" if is_point_center else "0"

print(area, is_multiple)

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:
a, b, c, d = map(int, input().split())
if c*2 == a and d*2 == b:
  ans = 1
else:
  ans = 0
print(a*b/2, ans)

Submission status: Accepted

Solution code:
def is_eql(a, b):
    return abs(a - b) < 1e-9

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

S = W * H / 2.
ans = 1 if is_eql(W/2., x) and is_eql(H/2., y) else 0

print("{} {}".format(S, ans))

Submission status: Accepted

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

if x+x == W and y+y == H:
    print("%.6f %d" % ((W*H)/2,1))
else:
    print("%.6f %d" % ((W*H)/2,0))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(w*h/2,bunkatu)

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

half_area = W * H / 2

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

Submission status: Accepted

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

half_area = W * H / 2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

g = (W/2,H/2)

if((x,y)==g):
    ans = W*H/2
    sign = 1
else:
    ans = W*H/2
    sign = 0
    
print(str(ans) + " " + str(sign))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(str(area) + " " + center)

Submission status: Accepted

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

S = float(W*H/2.0)
d = 0
if H/2 == y and W/2 == x:
        d = 1
print(str(S) + " " + str(d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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 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(float, input().split())

max_area = W*H/2.

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

print(max_area, ans)

Submission status: Accepted

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

print("{} {}".format(S, ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(w * h / 2, flag)

Submission status: Accepted

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

if W / 2 == x and H / 2 == y: way += 1

print(W * H / 2, way)

Submission status: Accepted

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

area = w*h/2

judge = 0

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

print(area,judge)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
logging.disable(logging.CRITICAL)

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

max_menseki = float(W) * float(H) / 2.0
if W / 2 == x and H / 2 == y:
    print("{:f}".format(max_menseki) + " " + str(1))
else:
    print("{:f}".format(max_menseki) + " " + str(0))

Submission status: Accepted

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

Submission status: Accepted

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

isMany = 0

#中心値
c_x = W/2.0
c_y = H/2.0

if(x == c_x and y == c_y):
    isMany = 1


print((W*H/2.0) ,isMany)

Submission status: Accepted

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

flag = False
if x * 2 == W and y * 2 == H:
	flag = True

print(W * H / 2,end=' ')
if flag:
	print(1)
else:
	print(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:
hantei=-1
ans=-1

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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


def solv(w, h, x, y):
    ha = w * h / 2
    dw = abs(w/2-x)
    dh = abs(h/2-y)
    if dw == 0 and dh == 0:
        return (ha, 1)
    else:
        return (ha, 0)


if __name__ == '__main__':

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

    ans = solv(w, h, x, y)

    print(ans[0], ans[1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
w, h, x, y = list(map(int, input().split()))
a = w * h / 2.0
if w & 1 == 0 and h & 1 == 0 and x == w // 2 and y == h // 2:
  b = 1
else:
  b = 0
print("%.6f %d" % (a, b))

Submission status: Accepted

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

mm = w*h

min = mm/2
print(min)
if x == w/2 and y == h/2:
    print("1")
else:
    print("0")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    s = list(map(int,input().split()))

    if (s[0] / 2.0 == s[2]) and (s[1] / 2.0 == s[3]):
        print(s[0] * s[1] / 2.0, 1)
    else:
        print(s[0] * s[1] / 2.0, 0)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

print(S,flag)

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

Submission status: Accepted

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

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

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