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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    W, H, x, y = list(map(int, sys.stdin.buffer.readline().split()))
    ret = (W * H) / 2
    p = x == W/2 and y == H/2
    print(ret, 1 if p else 0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    W, H, x, y = list(map(float, sys.stdin.buffer.readline().split()))
    ret = (W * H) / 2
    p = x == W/2 and y == H/2
    print(ret, 1 if p else 0)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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 = [int(x) for x in 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())
print(W*H/2, int(((W/2==x) and (H/2==y))))

Submission status: Accepted

Solution code:
w, h, x, y = [int(i) for i in input().split()]
if w%2==0 and w//2==x and h%2==0 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(float, 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:
w,h,x,y=map(int,input().split())
print(str(w*h/2)+' '+str(1*(w==2*x and h==2*y)))

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

W, H, X, Y = lr()
bl = (1 if W == X+X and H == Y+Y else 0)
print(W*H/2, bl)
#

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w, h, x, y = map(int, input().split())
hs = 0.5 * w * h
if x == w / 2 and y == h / 2:
    print("{:.10f}".format(hs), 1)
else:
    print("{:.10f}".format(hs), 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 = map(int, input().split())
if 2*x == W and 2*y == H:
    B=1
else: 
    B=0
print(W*H/2, B)

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:
A, B, C, D = map(int, input().split())
S = A*B/2

ans = 0
if C == A/2 and D == B/2:
  ans = 1
print(S,ans)

Submission status: Accepted

Solution code:
#C - Rectangle Cutting
W,H,x,y = map(int,input().split())
def main(W,H,x,y):
    if x == W/2 and y == H/2:
        ans1 = H*W/2
        ans2 = 1
    else:
        ans1 = H*W/2
        ans2 = 0
    print(ans1,ans2)
main(W,H,x,y)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Max = W*H/2

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

Submission status: Accepted

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

Submission status: Accepted

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

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

center_x = W / 2
center_y = H / 2
area = W * H / 2

if x == center_x and y == center_y:
    print(area, 1)
else:
    print(area, 0)

Submission status: Accepted

Solution code:


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


if __name__ == "__main__":
    submit()

Submission status: Accepted

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

ans1 = w*h/2
ans2 = 0
if((x*2==w)&(y*2==h)):
    ans2 = 1

print('{} {}'.format(ans1,ans2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def getint():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

wide,high,x,y = getint()
a,b = 0,0
if wide == 2*x and high == 2*y:
    b = 1
a = wide*high/2
print(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc130 c
w,h,x,y=map(int,input().split())
ans=w*h/2
flag=False
if w==x*2 and h==y*2:
    flag=True
if flag:
    print(ans,"1")
else:
    print(ans,"0")

Submission status: Accepted

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

Submission status: Accepted

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

if(x==w/2 and y==h/2):a=1
print('{:.7f}'.format(ans),a)

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

Submission status: Accepted

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


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

Submission status: Accepted

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

f = 0

if x * 2 == w and y * 2 == h:
    f += 1

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

Submission status: Accepted

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

S = (W*H) / 2

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

Submission status: Accepted

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

import sys

DEBUG = False

def solve():
    return


def read_int_list(sep = " "):
    return [int(s) for s in sys.stdin.readline().rstrip().split(sep)]

def read_int():
    return int(sys.stdin.readline())

def dprint(*args, **kwargs):
    if DEBUG:
        print(*args, **kwargs)
    return


def main():
    w, h, x, y = read_int_list()
    nr_ans = 1
    center_point = (h / 2, w / 2)
    if abs(center_point[0] - y) < 1e-9 and abs(center_point[1] - x) < 1e-9:
        nr_ans = 2
    print("%f %d" % (w * h / 2, nr_ans - 1))


if __name__ == "__main__":
    main()

Submission status: Accepted

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


def main():
    W, H, x, y = map(int, input().split())
    # y = a * x + b
    try:
        a = (y - H / 2) / (x - W / 2)
        b = y - a * x
        X = -b / a
    except ZeroDivisionError:
        a, b = 0, 0
        X = x

    cnt = (1 if W / 2 == x and H / 2 == y else 0)
    area = (X + W - X) * H / 2

    print(area, cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans1 = W*H/2
if x*2 == W and y*2 == H :
    ans2 = 1
else :
    ans2 = 0

print(ans1, ans2)

Submission status: Accepted

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

area = W*H/2
fl = 2*x==W and 2*y==H
print(area,int(fl)) if fl else print(area,int(fl))

Submission status: Accepted

Solution code:

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

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

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

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

Submission status: Accepted

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

print(half, p)

Submission status: Accepted

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

area = W*H / 2
pl = x == W / 2 and y == H / 2
print(area, int(pl))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#130_C
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(float,input().split())

#長方形の重心を求める
gx = W / 2.0
gy = H / 2.0

# x,yが重心と一致する場合は複数ある
split = 0

if x == gx and y == gy:
    split = 1

print(W*H/2.0,split)

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"
s=w*h/2
print(str(s)+" "+ans)

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:
#n=int(input())
w,h,x,y=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

ans=w*h/2

if 2*x==w and 2*y==h:
    pt=1
else:
    pt=0
print('{:.9f} {}'.format(ans,pt))

Submission status: Accepted

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

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(ans1, ans2)

Submission status: Accepted

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

t = w * h / 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

t = w * h / 2

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

Submission status: Accepted

Solution code:
import math
def main():
    t = [int(t)for t in input().split()]
    w,h,x,y = t[0],t[1],t[2],t[3]

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
X, H, x, y = map(int, input().split())
S = X * H
max_small = S / 2

print(max_small, end=' ')

if x == (X/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

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

print(str(s)+" "+str(d))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(w*h/2, a)

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

Submission status: Accepted

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

Submission status: Accepted

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

judge=0

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

print(W*H/2,judge)

Submission status: Accepted

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

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

    print(W * H / 2, 0)


main()

Submission status: Accepted

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

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


class Solution:
    def solve(self, W: int, H: int, x: int, y: int) -> int:

        area = 0.5 * W * H

        if x * 2 == W and y * 2 == H:
            return area, 1
        else:
            return area, 0


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    answer = solution.solve(W, H, x, y)
    print(answer[0], answer[1])

Submission status: Accepted

Solution code:
import numpy as np

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

ans_1 = W*H/2

if (x == W/2) & (y == H/2):
    ans_2 = 1
else:
    ans_2 = 0
    
ans = str(ans_1) + " " + str(ans_2)

print(ans)

Submission status: Accepted

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

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

if __name__=='__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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


print(str(menseki) + " " + str(flag))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

W, H, x, y = MAP()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

# 面積の半分
area_half = W * H / 2
# 点 x,y が中心なら分割方法は複数
if x == W/2 and y == H/2:
  print(area_half, 1)
else:
  print(area_half, 0)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os, sys, re, math, queue

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
ary = list(map(int,input().split(" ")))
area = ary[0]*ary[1]/2
f = 0
if ary[0] / 2 - ary[2] == 0 and ary[1] / 2 - ary[3] == 0:
    f = 1
print(area,f)

Submission status: Accepted

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

if(2*x==w and 2*y==h): flg = 1

print(w*h/2, end=' ')
print(flg)

Submission status: Accepted

Solution code:
w, h, x, y = list(map(int, input().split(' ')))
hoge = w / 2 == x
fuga = h / 2 == y
print('%.6f %s' % ((w*h) / 2, int(hoge and fuga)))

Submission status: Accepted

Solution code:
W, H, x, y = [int(s) for s in input().split(' ')]
S = W * H / 2
D = 1 if W / 2 == x and H / 2 == y else 0
print('%f %d' % (S, D))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

w,h,x,y=mii()

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

Submission status: Accepted

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

s = w*h/2

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

print(s, flag)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
W,H,x,y=map(int,input().split())
a=W*H/2
print(a,1) if W/2==x and H/2==y else print(a,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:
def main():
  import fractions
  
  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)
  
if __name__=="__main__":
  main()

Submission status: Accepted

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

max_area = w*h/2

if w%2!=0 or h%2!=0:
    split = 0

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

print('{} {}'.format(max_area, split))

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

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=map(int,input().split())
gx=w/2
gy=h/2
s=(w*h)/2
if gx==x and gy==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 = map(int, input().split())

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

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

Submission status: Accepted

Solution code:
import sys

w, h, x, y = map(int, sys.stdin.readline().split())

def main():
    s = w * h / 2
    f = (x == w / 2 and y == h / 2) & 1
    return s, f

if __name__ == '__main__':
    ans = main()
    print(*ans, sep=' ')

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

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

Submission status: Accepted

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

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

print(ans,num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Code for C - Rectangle Cutting
# Use input() to fetch data from STDIN
[d, w, x, y] = [int(x) for x in input().split()]

m = d * w / 2

r = 1 if d / 2 == x and w / 2 == y else 0

print(m, r)

Submission status: Accepted

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

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from collections import deque, Counter, defaultdict
from fractions import gcd
input = sys.stdin.readline

def eprint(s):
    if type(s) != type('str'):
        s=str(s)

    sys.stderr.write(s+'\n')
    return

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h,x,y = map(int,input().split())
ans = 1 if 2*x==w and 2*y==h else 0
print(str(w*h/2)+' '+str(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())
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 = list(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:
def solve(w, h, x, y):
    return w * h / 2, 1 if w / 2 == x and h / 2 == y else 0

_w, _h, _x, _y = list(map(int, input().split()))
print(*solve(_w, _h, _x, _y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 理解するまでが面白い
# 思考5分、実装1分
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())
#print(w,h,x,y)

print(w*h/2)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
X, H, x, y = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans1,ans2)

Submission status: Accepted

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

Submission status: Accepted

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

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