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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = w * h * 0.5
flg = 1 if x == w * 0.5 and y == h * 0.5 else 0

print(s, flg)

Submission status: Accepted

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

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

print(float(W * H / 2), num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

hoge = 0

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

print(W*H/2,hoge)

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

Submission status: Accepted

Solution code:
#coding: utf-8
import math
import heapq
import bisect
#from scipy.misc import comb

MOD = 10**9+7

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
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

W, H, x, y = MAP()

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

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

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

print('{:.12f}'.format(W * H / 2))
print(center)

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

s = W*H

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

print(W*H/2, res)

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:
# ABC130 C - Rectangle Cutting
w,h,x,y = map(int,input().split())
rectangle = 0
ans = 0
if w==2*x and h==2*y:
    ans = 1
rectangle = (w*h)/2
print(rectangle,ans)

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

W, H, x, y = map(int, sys.stdin.readline().split())
if x==W/2 and y ==H/2:
    me = 1
else:
    me = 0

print(W*H/2, me)

Submission status: Accepted

Solution code:
def rect(W,H,x,y):
    ans = [0]*2
    ans[0] = W*H/2
    if x == W/2 and y == H/2:
        ans[1] = 1
    else:
        ans[1] = 0
    return ans

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

a = rect(W,H,x,y)
print(*a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

W, H, X, Y = map(int, input().split())
m = int(X*2==W and Y*2==H)
a = W * H / 2

print(a, m)

Submission status: Accepted

Solution code:
def main(W: int, H: int, x: int, y: int):
    area = W * H
    count = 0

    if x * 2 == W and y * 2 == H:
        count = 1

    print("{:.6f}".format(area / 2), count)


if __name__ == "__main__":
    W, H, x, y = map(int, input().split())

    main(W, H, x, y)

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
 
s = W * H / 2
n = 0
if W == 1 or H == 1:
	pass
elif x == W / 2 and y == H / 2:
	n = 1
 
print('{:.9f}'.format(s), n)

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

Submission status: Accepted

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

Submission status: Accepted

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

area = (w * h) / 2
pattern = (2 * x) == w and (2 * y) == h

print('{:f} {:d}'.format(area, pattern))

Submission status: Accepted

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

Submission status: Accepted

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

W, H, x, y = [int(x) for x in input().strip().split()]
c = 0
if x == W / 2 and y == H / 2:
  c += 1
print(W * H / 2, c)

Submission status: Accepted

Solution code:
W, H, x, y = (int(i) for i in input().split())
out = []
out.append(str(W * H / 2))

check = '1' if x == W/2 and y == H/2 else '0'
out.append(check)
print(' '.join(out))

Submission status: Accepted

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

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

Submission status: Accepted

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

area = input[0] * input[1] / 2
flag = 0
if (input[0] / 2 == input[2]) and (input[1]/2 == input[3]):
  flag = 1
  
print(str(area) + " " + str(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())
m=w*h/2
if x==0 or y==0:
    print(m,0)
    exit()
if x==w or y==h:
    print(m,0)
    exit()


if w%x==0 and h%y==0:
    print(m,1)
else:
    print(m,0)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
w,h,x,y=map(int,input().split())
#print(min(max(x*h,(w-x)*h),max(y*w,(h-y)*w)))
if w==x+x and h==y+y:
    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())
ans1 = (w * h) / 2
if x == w / 2 and y == h / 2:
    ans2 = 1
else:
    ans2 = 0
print("{:.9f}".format(ans1), ans2)

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())
W = w / 2
H = h / 2
area = (w * h) / 2
center = (w / 2, h / 2)

print(area,1 if center == (x,y) else 0)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
ans = 0


[W,H,x,y] = inpl()
ans1 = W*H/2.0
ans2 = 1 if abs(2*x-W)<eps and abs(2*y-H) <eps else 0

print(*[ans1,ans2])

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(W, H, x, y):
    """Test Case
    >>> print_ans(2, 3, 1, 2)
    3.000000 0
    >>> print_ans(2, 2, 1, 1)
    2.000000 1
    """
    area = W * H / 2
    whether = "1" if x * 2 == W and y *2 == H else "0"
    print("{} {}".format(str(area), whether)) 

if __name__ == '__main__':
    W, H, x, y = map(int, input().rstrip().split())
    print_ans(W, H, x, y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,x,y = map(float,input().split())
if y == (H/W)*x and y == H - (H/W)*x:
    tf = 1
else:
    tf = 0
print(" ".join([str(W*H/2),str(tf)]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    sc = Scan()
    w, h, x, y = sc.intarr()
    flag = 0
    if w == 0 or h == 0:
        print('0 0')
        exit()
    if w/2 == x and h/2 == y:
        flag = 1
    s = w * h / 2
    print(s, flag)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()

Submission status: Accepted

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

Area = W * H
if (2*x == W) & (2*y == H):
    print(0.5*Area, 1)
else:
    print(0.5*Area, 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
w,h,x,y = map(int,input().split())
midpoint = [w/2, h/2]

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

Submission status: Accepted

Solution code:
# 2019-11-14 17:27:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# from scipy.misc import comb # float
# import numpy as np 

def main():
    W, H, x, y = [int(i) for i in sys.stdin.readline().split()]

    # どこに座標をとっても必ず中心を通る直線で半分になる
    # 座標が中心の場合のみ、長方形を半分に分断する直線が無数に存在する
    area = W * H / 2
    if W == x * 2 and H == y * 2:
        sign = '1'
    else:
        sign = '0'
    print(area, sign)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

S = (W * H) / 2

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

Submission status: Accepted

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

ans = (W * H) / 2

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

print(ans,d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

cw = W/2
cH = H/2

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

else:
    y0 = y-((y-cH)/(x-cw))*x
    y1 = y-((y-cH)/(x-cw))*(x-W)
    print((y0+y1)*W/2)
    print(0)

Submission status: Accepted

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

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

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

# %%
if __name__ == '__main__':
    main()

# %%
# from atcoder_test import doTest
# doTest("abc130","c",main)

Submission status: Accepted

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

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

Submission status: Accepted

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

a = w*h / 2

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

print(a, f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H = list(map(int,input().split()))
h = H[0]
w = H[1]
x = H[2]
y = H[3]

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

print(h*w/2,a)

Submission status: Accepted

Solution code:
import unittest


class TestC(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(2, 3, 1, 2), [3, 0])

    def test_2(self):
        self.assertEqual(think(2, 2, 1, 1), [2, 1])


def solve():
    w, h, x, y = read()
    result = think(w, h, x, y)
    write(result)


def read():
    return read_int(4)


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(w, h, x, y):
    area = calc_smaller_area(w, h)
    multiple_ways_exist = can_be_multiple_ways(w, h, x, y)
    return [area, 1 if multiple_ways_exist else 0]


def write(result):
    print('{0:f} {1:d}'.format(result[0], result[1]))


def calc_smaller_area(w, h):
    return w * h / 2.0


def can_be_multiple_ways(w, h, x, y):
    return x == w / 2.0 and y == h / 2.0


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

MOD = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#解答
w, h, x, y = list(map(int, input().split()))
ans = 0
 
if ((x, y) == (w / 2, h / 2)):
    print("{s} {mul}".format(s=(w * h / 2), mul=1))
else:
    print("{s} {mul}".format(s=(w * h / 2), mul=0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    w,h,x,y=map(int,input().split())
    print(w*h/2,int(w==x*2 and h==y*2))
resolve()

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 = list(map(int, input().split()))
s = w * h / 2
 
if ((x, y) == (w / 2, h / 2)):
    print("{s} {mul}".format(s=s, mul=1))
else:
    print("{s} {mul}".format(s=s, mul=0))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

X = W / 2 == x
Y = H / 2 == y

print(W * H / 2, 1 if X & Y else 0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

area  = w * h / 2
if x == w / 2 and y == h / 2:
  judge = 1
else:
  judge = 0

print(str(area) + ' ' + str(judge))

Submission status: Accepted

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

print(W*H/2.0)

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

Submission status: Accepted

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

Submission status: Accepted

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

core = [W/2,H/2]
if x == core[0] and y == core[1]:
	print(round((W*H)/2,3),' 1')
else:
	print(str("{:.7f}".format((W*H)/2)),' 0')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

midw = w/2
midh = h/2

menseki = (w * h) / 2
check = 0
if midw == x and midh == y:
    check = 1

print(str("{:.6f}".format(menseki))+ " " + str(check))

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

ret = w*h/2

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

print(ret, cho)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = w*h/2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

gx=W/2
gy=H/2
S=W*H

if gx==x and gy==y:
  print(S/2,1)
else:
  print(S/2,0)

Submission status: Accepted

Solution code:
# -*- coding:utf8 -*-

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S_MAX=W*H*(1/2)

count=0
if(2*x==W and 2*y==H):
    count+=1

print(S_MAX,count)

Submission status: Accepted

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

Submission status: Accepted

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

print((W*H)/2, end=' ')

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

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('{} {}'.format(W*H/float(2),ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

print(' '.join(map(str, [W*H/2, a])))

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

W,H,x,y

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

Submission status: Accepted

Solution code:
W, H, x, y = map(int, input().split())
print('{:.6f}'.format(W/2*H), 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())

case = 0

if w/2 == x and h / 2== y:
  case = 1
else:
  case = 0
  
s = w*h/2

print(float(s),case)

Submission status: Accepted

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

S=w*h/2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

w,h,x,y = [float(x) for x in stdin.readline().rstrip().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,1if 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(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('{:.8f}'.format(w*h/2,end=' '))
print(int(x==w/2 and y==h/2))

Submission status: Accepted

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

Submission status: Accepted

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

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:
    a='1'
else:
    a='0'
print(S,a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,X,Y = map(float,input().split())
max_area = (W * H / 2)

method = 0

if X == W / 2 and Y == H / 2:
	method = 1
	
print(max_area,method)

Submission status: Accepted

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

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

Submission status: Accepted

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

# 直線が長方形の対角線の交点Zを通るとき、長方形の面積は二等分される
# そのような直線が複数あるのは、Zと(x,y)が一致するときだけ

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