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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = [int(a) for a in input().split()]

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

Submission status: Accepted

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

_maxarea = W*H/2
mul_judge = 0

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

print(str(_maxarea)+' '+str(mul_judge))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import exit
import math
import collections
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

w,h,x,y = mi()
ans = w * h / 2
check = 0
if x == w / 2 and y == h / 2:
    check = 1

print('{} {}'.format(ans,check))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
w,h,x,y = readInts()
w = float(w)
h = float(h)
area = (w*h)/2 # 一意
#print(w,h)
result = 0
if (x+x) == w and (y+y) == h:
    # 中心で分割できるか
    result = 1
print(area,result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def LI():
    return list(map(int, input().split()))


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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(W, H, x, y):
    print(W * H / 2, 1 if x * 2 == W and y * 2 == H else 0)

if __name__ == '__main__':
    input = sys.stdin.readline
    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
if 2*x==W and 2*y==H:
    flag = 1
else:
    flag = 0
print(S,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:
W,H,x,y = map(int,input().split())
ans1,ans2 = W*H/2,0
if 2*x == W and 2*y == H:
    ans2 = 1
print(ans1,ans2)

Submission status: Accepted

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

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:
# C - Rectangle Cutting
W,H,x,y = map(int,input().split())
S = W*H

# H,W の中心と x,y の距離
distx = abs(W/2 - x)
disty = abs(H/2 - y)

if distx == disty == 0:
    ans = (S/2,1)
else:
    ans = (S/2,0)
print(*ans)

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

Submission status: Accepted

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

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

else:
  print(w*h/2,'0')

Submission status: Accepted

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

Submission status: Accepted

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

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

print(S,j)

Submission status: Accepted

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

Submission status: Accepted

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

ans = W * H
ans = float(float(ans) / 2.0)
ans2 = 0
if x == float(float(W) / 2) and y == float(float(H) / 2):
    ans2 = 1

print(str(ans) + " " + str(ans2))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
w, h, x, y = map(int, input().split())
ans = (w * h) / 2
print(ans)
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, 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())
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 = 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())
str1 = f'{w * h / 2:.09f}'
str2 = '1' if w == x * 2 and h == y * 2 else '0'
print(' '.join([str1,str2]))

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
W,H,X,Y = map(int,input().split())

a = W*H//2
if W*H%2 == 1:
  a = str(a)+".5"
b = int(W==X*2 and H==Y*2)
print(a,b)

Submission status: Accepted

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

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

print(W*H/2, a)

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:
'''
Created on 2020/08/29

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  W,H,x,y=map(int,pin().split())
  ans=W*H/2
  pout(f"{ans} ")
  if W-x==x and H-y==y:
    print(1)
  else:
    print(0)
  return 
main()

Submission status: Accepted

Solution code:
#

import sys
# sys.setrecursionlimit(100000)


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


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(area, m)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

area=w*h/2

print(area,bun)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

W,H,x,y = MI()

# 長方形の中心

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

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

Submission status: Accepted

Solution code:
import sys

W, H, x, y = map(int, sys.stdin.readline().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())

# 面積の最大値は常に長方形の半分
# (x, y)がど真ん中の時だけ縦にも横にも切れる
ans = 0
if ((w / 2) == x) & ((h / 2) == y):
    ans = 1

print(w * h / 2, ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    w,h,x,y = LI()
    area = w * h
    ans1 = area /2
    ans2 = 0
    if w == 2*x and h == 2*y:
        ans2 = 1

    print(ans1,ans2)

main()

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=[int(x) for x in 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, 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(x*H,1)
else:
    print(W*H/2,0)

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

if x == W/2.0 and y == H/2.0:
    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())

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

# m=min(W*y, H*x)

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 = SJIS

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

area = w * h
ans = area / 2
ok = 0

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

print(ans, ok)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())


w, h, x, y = inintm()

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 = W*H/2
if x*2 == W and y*2 == H:
    ret = 1
else:
    ret = 0

print(S,ret)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ox = w/2
xy = h/2
s = w*h/2

if ox == x and xy == y:
  print(s, 1)

else:
  print(s, 0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,w,h = map(float, input().split())
ans =0
if w+w ==W and h+h==H:
    ans =1
print('{:9f} {}'.format(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(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(' '))

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
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    W,H,x,y=MI()
    ans=(W*H)/2
    if x==W/2 and y==H/2:
        print(ans,1)
    else:
        print(ans,0)
    
    

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
W, H, x, y = list(map(lambda n: int(n), input().split(" ")))
 
S = W * H / 2

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

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools
from collections import Counter

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



if __name__=="__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

flag = 0

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

print(w * h / 2, flag)

Submission status: Accepted

Solution code:
# coding: utf-8

def solve(W, H, x, y):
  mw, mh = W / 2, H / 2
  return f'{W * H / 2} {int((x, y) == (mw, mh))}'


if __name__ == '__main__':
  print(solve(*map(int, input().split())))

Submission status: Accepted

Solution code:
#中心を通る時面積は二等分される
#つまり大きくない方の面積の最大値はw*h/2
#x、yが中心の時面積を2等分する直線は無限に引くことができる
#中心でない時、中心との結ぶ線は1本しか弾けない

w,h,x,y=list(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:
def main():
    W, H, x, y = map(int, input().split())
    area = (H*W)/2
    mid_x, mid_y = W/2, H/2
    if x == mid_x and y == mid_y:
        ans = 1
    else:
        ans = 0
    print(area, ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

a = w*h/2
m = "1" if (x==w/2) and (y==h/2) else "0"

print(str(a) + " " + m)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

W, H, x, y = LI()


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


if __name__ == "__main__":
    main()

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 = list(map(int,input().rstrip().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())
s=W*H/2
x=1 if W/2==x and H/2==y else 0
print('{} {}'.format(s,x))

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,open(0).read().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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc130_c

def gcd(a, b):
    if a < b:
        a, b = b, a
    while b > 0:
        tmp = a
        a = b
        b = tmp % b
    return a

w, h, x, y = map(int, input().strip().split())
area = w * h / 2
has_points = 0
if 2 * x == w and 2 * y == h:
    has_points = 1
# if abs(2*x-w) == 0 and h > 1:
#     has_points = 1
# elif abs(2*y-h) == 0 and w > 1:
#     has_points = 1
# elif w >= 3*abs(2*x-w) and h >= 3*abs(2*y-h):
#     has_points = 1
# elif gcd(abs(2*x-w), abs(2*y-h)) > 1:
#     has_points = 1

print(area, has_points)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(w*h/2,hou)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W, H, x, y = [int(i) for i in 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())
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())
p=1 if w==x*2 and h==y*2 else 0
print("{:.10f}".format((w*h)/2),p)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

area = W * H / 2

checker = 0

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

print(area, checker)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cx, cy = W/2, H/2

flg = 0
if x == cx and y == cy:
    flg = 1

print(W*H/2, flg)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from decimal import Decimal
w, h, x, y = map(int, input().split())
print("{:.9f}".format(Decimal(w)*Decimal(h)*Decimal(0.5)), int(2*x==w and 2*y==h))

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

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