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

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())
bun = 0
if (W / 2) == x and (H / 2) == y:
	bun = 1

print(W*H/2.0, bun)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s_max = W * H / 2.0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

center_x,center_y = W/2 , H/2

s = W*H / 2

if (center_x == x and center_y == y) or (center_y == x and center_x == y):
    print("{} {}".format(s,1))
else:
    print("{} {}".format(s,0))

Submission status: Accepted

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

sq = w*h/2
flag = 1 if w == x*2 and h == y*2 else 0

print(sq,flag)

Submission status: Accepted

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

m = (w*h)/2

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

print("{:.9}".format(m));print(s)

Submission status: Accepted

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

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

area = W * H
half_area = area / 2

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

print("{} {}".format(half_area, method_number))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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


if __name__ == '__main__':
    solve()

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:
import sys
input = sys.stdin.readline
W, H, x, y = map(int, input().split())
S = W * H * 0.5
center = (W / 2, H / 2)
p = (x, y)
if (p == center):
  print(S, 1)
else:
  print(S, 0)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
W, H, x, y = map(int, input().split())
S = W * H * 0.5
if (x != 0 and y/x == H/W and W % 2 == 0):
  print(S, 1)
else:
  print(S, 0)

Submission status: Accepted

Solution code:
inf = input().split()
W = int(inf[0])
H = int(inf[1])
x = int(inf[2])
y = int(inf[3])
 
s=W*H
if not s%2==0:
  s = s//2+0.5
else:
  s = s/2
st = "{0:.9f}".format(s)
if W%2==0 and H%2==0:
  gx = W//2
  gy = H//2
  if gx==x and gy==y:
    print(st, 1)
  else:
    print(st, 0)
else:
  print(st, 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())
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())
a = W * H / 2
print('{} {}'.format(a, 1 if W/2 == x and H/2 == y else 0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
ans=str(a[0]*a[1]/2)

if a[0]/2==a[2] and a[1]/2==a[3]:
    print(ans+" 1")
else:print(ans+" 0")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
ans=str(a[0]*a[1]/2)

if a[0]/2==a[2]:
    if a[1]/2==a[3]:
        print(ans+" 1")
    else:print(ans+" 0")
else:print(ans+" 0")

Submission status: Accepted

Solution code:
a=list(map(float,input().split()))
ans=str(a[0]*a[1]/2)

if a[0]/2==a[2]:
    if a[1]/2==a[3]:
        print(ans+" 1")
    else:print(ans+" 0")
else:print(ans+" 0")

Submission status: Accepted

Solution code:
a = list(map(float,input().split()))
answer = float(a[0] * a[1]/2)
print(answer)
if a[2] == a[0]/2:
  if a[3] == a[1]/2:
    print(1)
  else:
    print(0)
else:
  print(0)

Submission status: Accepted

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

smaller_max_area = W * H / 2
pattern = 1 if x == W / 2 and y == H / 2 else 0

print(smaller_max_area, pattern)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def rectangle_cutting(W: int, H: int, x: int, y: int)->tuple:
    area = W*H/2
    exists_some = 2*x == W and 2*y == H

    return area, exists_some


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

    area, exists_some = rectangle_cutting(W, H, x, y)
    print(area, 1 if exists_some else 0)

Submission status: Accepted

Solution code:
from sys import stdin

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

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

print("{} {}".format(W*H/2, multiFlg))

Submission status: Accepted

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

m = W * H
half = m / 2.0

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

print(half, multi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

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

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

W, H, x, y = l_inpl()

half = W * H / 2

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

print(half, ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

    maxarea = W * H / 2

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

print(str(s)+  str(' ') + str(k))

Submission status: Accepted

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

m_x, m_y = w / 2, h / 2

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_input = input()
W, H, x, y = tuple([int(a) for a in _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(float, input().split())
S = W * H /2
print(S, 1 if 2*X==W and 2*Y==H else 0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
import numpy as np
 
W, H, x, y = [int(i) for i  in re.split(" ", input())]
 
print(W * H / 2)
 
if x * 2 == W and y * 2 == H:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
Wid, Hi, x, y = list(map(int, input().split()))

print(Wid*Hi/2, end = " ")

if((Wid/2 == x) and (Hi/2 == y)):
	print(1)
	
else:
	print(0)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = str(float((w * h) / 2))

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

print(ans, ans2)

Submission status: Accepted

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

area = w * h / 2

flag = 0

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

print(area, flag)

Submission status: Accepted

Solution code:
W,H,x,y = [int(i) for i in input().split()]
flag=0
if W==x+x and H==y+y:
    flag=1



print(W*H/2,flag)

Submission status: Accepted

Solution code:
W,H,x,y = [int(i) for i in input().split()]
flag=0
if W==x*2 and H==y*2:
    flag=1



print(W*H/2,flag)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 面積は必ず二等分可能
# 面積を二等分する直線は長方形の中心を通る
ans = '{} {}'.format(
    W * H / 2,
    1 if x == W / 2 and y == H / 2 else
    0
)

# 出力
print(ans)

Submission status: Accepted

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

import sys
import copy

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

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

ans = (W * H) / 2.0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(answer,q)

Submission status: Accepted

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

center_x = float(W)/2
center_y = float(H)/2

if center_x == float(x) and center_y == float(y):
    num = 1
else:
    num = 0

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc130/tasks/abc130_c
w,h,x,y = [int(i) for i in 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())
math = 0
num = 0

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

math = W * H / 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print("{area} {isMultiple}".format(area=area, isMultiple=isMultiple))

Submission status: Accepted

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

Submission status: Accepted

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

if x == W/2 and y == H/2:
    area = x*H
    print("{:.9f} {}".format(area,1))
else:
    area = W*H/2
    print("{:.9f} {}".format(area,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:
import math 
W,H,x,y=list(map(int,input().strip().split(' ')))
mid_x,mid_y=W/2,H/2

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

Submission status: Accepted

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

print(w*h/2,ans)

Submission status: Accepted

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

if __name__ == '__main__':
    w, h, x, y = list(map(int, input().split()))

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

    og = 0
    if x + x == w and y + y == h:
        og = 1

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

Submission status: Accepted

Solution code:
width, height, x, y = map(float,input().split())

center_x = width/2
center_y = height/2

s = width * height/2
label = 0
if x == center_x and y == center_y:
    label = 1

print(s, label)

Submission status: Accepted

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

area=(W*H)/2

center=0
if float(x)==W/2 and float(y)==H/2:
	center=1
print("%f %d"%(area,center))

Submission status: Accepted

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

x = INPUT[2]
y = INPUT[3]

cx = INPUT[0]/2
cy = INPUT[1]/2

min_area = INPUT[0]*INPUT[1]/2

if x == cx and y == cy:
    print(min_area,1)
else:
    print(min_area,0)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# 面積は必ず二等分可能
# 面積を二等分する直線は長方形の中心を通る
ans = '{} {}'.format(
    W * H / 2,
    1 if x == W / 2 and y == H / 2 else
    0
)

# 出力
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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


print(area, flag)

Submission status: Accepted

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


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

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

max=W*H*1/2

centerx=1/2*W
centery=1/2*H

print(max)
if (x == centerx and y == centery):
    print("1")

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(W*H/2,f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	W, H , x, y = map(int, input().split(" "))
	ans1 = W * H /2
	ans2 = 0
	if x == W/2 and y == H/2:
		ans2 = 1
	
	print("{} {}".format(ans1, ans2))
	
	
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

result1 = W * H / 2
result2 = 1 if x == W / 2 and y == H / 2 else 0

print(result1, result2)

Submission status: Accepted

Solution code:
#-*- coding: utf-8 -*-
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 sys
input = sys.stdin.readline

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

m = W * H


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

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(W: int, H: int, x: int, y: int):
    if x * 2 == W and y * 2 == H:
        p = 1
    else:
        p = 0
    print(W * H / 2, p)
    return


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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):
    z=1
else:
    z=0
print("{:.6f}".format(s),end=" ")
print(z)

Submission status: Accepted

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

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

print(str(w * h / 2) + " " + str(ff))

Submission status: Accepted

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

gx = w/2
gy = h/2

if x==gx and y==gy:
    a = 1
else:
    a = 0


print(w*h/2,a)

Submission status: Accepted

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

a=int(0)

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

print(str(w*h/2)+" "+str(a))

Submission status: Accepted

Solution code:
a,b,x,y = map(int,input().rstrip().split(' '))
r = 0
if x + x == a and y + y == b:
    r = 1
print(a*b/2,r)

Submission status: Accepted

Solution code:
a,b,c,d =map(int,raw_input().split())

if c == a*.5 and d == b*.5:
    print a*b*.5, 1
else:
    print a*b*.5, 0

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#n = int(input()) 
w,h,x1,y1 = (int(i) for i in input().split())

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

S=W*H/2

#print("{0:.6f}".format(H*W/2))

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

else:
    o=0

print("{0:.6f}".format(S),o)

Submission status: Accepted

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

print('{:.6f}'.format(W * H / 2), int((x + x == W) and (y + y == H)))

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:
  l = 1
else:
  l = 0
print(str(S) + " " + str(l))

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("POSSIBLE")
    elif q == 0:print("IMPOSSIBLE")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

#n = ip()                                     #入力整数1つ
n,m,x,y= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(m)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#a.pop(0)は10^5あるときTLEしやすい!注意!抜くなら逆ソート!

print((n*m)/2,end =' ')
if n == 2*x and m == y*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('{:.6f}'.format(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 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,(w/2==x and h/2==y)*1)

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

S = W * H / 2
multi = 2 * x == W and 2 * y == H

print(S, int(multi))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans1 = W*H/2
ans2 = 0

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

Submission status: Accepted

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

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