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

Submission status: Accepted

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

print(W*H/2.0, flag)

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

Submission status: Accepted

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

if x==W/2:
  if y==H/2:
    a=1


print(str(S)+" "+str(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

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 decimal
w, h, x, y = map(int, input().split())

decimal.getcontext().prec = 9
w = decimal.Decimal(w)
h = decimal.Decimal(h)
d = decimal.Decimal(2)

print("{:.6f}".format((w*h) / d))

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

Submission status: Accepted

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

a = w * h / 2
b = int((float(x) == w / 2) and (float(y) == h / 2)) if (x != 0 and y != 0) else 0
print(str(a) + ' ' + str(b))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc130/tasks/abc130_c
import itertools
from collections import Counter
from collections import defaultdict
import bisect
from heapq import heappush, heappop

def main():
    W, H, x, y = map(int, input().split())
    area = W * H
    if x == W / 2 and y == H / 2:  # 中点
        print('{} {}'.format(area / 2, 1))
    else:
        print('{} {}'.format(area / 2, 0))
        # center_x = W / 2
        # center_y = H / 2
        # if x == center_x or y == center_y:
        #     print('{} {}'.format(area // 2), 0)
        # else:
        #     a = (center_x - x) / (center_y - y)
        #     b = y - a * x
        #     if 0 <= b <= H:
        #         area1 = (b + )
        #
        #
        #     else:




if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

print((w * h) / 2)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=input().rstrip().split(" ")
for i in range(4):
    n[i]=int(n[i])
S=n[0]*n[1]
senter=[n[0]/2,n[1]/2]#1
dis=[n[2],n[3]]#2
a=senter[1]-dis[1]
b=dis[0]-senter[0]
if(senter[1]==dis[1] and senter[0]==dis[0]):
    print(str(S/2) +" "+str(1))
else:
    print(str(S/2) +  " "+ str(0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
l=[]
l.append(a*b/2)
if a/2==c and b/2==d:
    l.append(1)
else:
    l.append(0)
for i in l:
    print(i,end=" ")

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

s=w*h/2

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

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

b=0
c=(a[0]*a[1])/2
if a[2]==a[0]/2 and a[3]==a[1]/2:
  b=1
print(str(c)+" "+str(b))

Submission status: Accepted

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

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

print(W*H/2, result)

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

Submission status: Accepted

Solution code:
w, h, x, y = (float(_) for _ in input().split()) 
s_x = w/2
s_y = h/2
if s_x == x and s_y == y:
    ans =1
else:
    ans =0
print("{} {}".format(w*h/2,ans))

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
w = data[0]
h = data[1]
x = data[2]
y = data[3]
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())

area = (W * H) / 2

if (x * 2) == W and (y * 2) == H:
    another_ans = 1
else:
    another_ans = 0

print(area, another_ans)

Submission status: Accepted

Solution code:
from decimal import *
W,H,x,y=map(Decimal,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 = map(int,input().split(" "))
area = W*H/2
if((float(x)==W/2) and (float(y)==H/2)):
    flag = 1
else:
    flag = 0
print("{} {}".format(str(area),str(flag)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC130C-RectangleCutting.py

import sys

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

if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

s = list(map(int, input().split()))

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


small_area = W * H /2.
if x == W/2. and y == H/2.:
    MultipleSeparation = 1
else:
    MultipleSeparation = 0

print(small_area, MultipleSeparation)

Submission status: Accepted

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

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

Submission status: Accepted

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

# Area
area = (W * H)/2

# pattern
if (W/2 == x) and (H/2 == y):
    pattern = 1
else:
    pattern = 0

print(area, pattern)

Submission status: Accepted

Solution code:
a = input().split()
w = int(a[0])
h = int(a[1])
x = int(a[2])
y = int(a[3])
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())
if x == W // 2 and y == H / 2:
    res = 1
else:
    res = 0
print(H*W/2, res)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    W, H, x, y = LI()
    c_w, c_h = W/2, H/2
    way = 0 
    if x == c_w and y == c_h:
        way = 1
    print("{} {}".format(W*H/2, way))
main()

Submission status: Accepted

Solution code:
import numpy as np
from collections import defaultdict
from functools import reduce

# s = input()
# n = int(input())
# A = list(map(int, input().split()))
W, H, x, y = map(int, input().split())

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

print(W*H/2, res)

Submission status: Accepted

Solution code:
# ABC130C
W, H, x, y = map(int,input().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())
s=float((w/2)*h)
ans=0
if w%2==0 and h%2==0:
    if w//2==x and h//2==y:
        ans=1
else:
    ans=0

print(str(float(s))+" "+str(ans))

Submission status: Accepted

Solution code:
from decimal import Decimal, getcontext
W, H, x, y = map(int, input().split())
getcontext().prec = 10

gpoint = [W/2, H/2]
res = [0,0]

if gpoint[0] == x and gpoint[1] == y:
    res[1] = 1
else:
    res[1] = 0

res[0] = Decimal(W) * Decimal(H) / Decimal(2)
res[0] = float(res[0])
# print(res)

for i in res:
    print(i, end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

W, H, x, y = map(int, input().split())
ans = W * H / 2.0

# if x == W // 2 and y == H // 2:  # bug!!
if x * 2 == W and y * 2 == H:
    print("{:.12f} {}".format(ans, 1))
else:
    print("{:.12f} {}".format(ans, 0))

Submission status: Accepted

Solution code:
w,h,x,y = [int(i) for i in input().split()]
if x == w/2 and y == h/2:
    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())

ans = w * h / 2

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

print(ans, multi)

Submission status: Accepted

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

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

print(W * H / 2, opt)

Submission status: Accepted

Solution code:
a=input().split()
W,H,x,y=int(a[0]),int(a[1]),int(a[2]),int(a[3])
s=W*H/2
if W==2*x and H==2*y:
    r=1
else:
    r=0
print("{} {}".format(s,r))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from decimal import Decimal
[W,H,x,y] = list(map(int,input().split()))
sq = W*H / 2
x_tmp = W/2
y_tmp = H/2
id = 0
if abs(x - x_tmp) < 10**(-8) and abs(y - y_tmp) < 10**(-8):
    id = 1
print(Decimal(sq),id)

Submission status: Accepted

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

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:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

b = y - x * ((y-cy) / (x-cx))
if (b >= 0) and (b <= h):
    bb = ((y-cy) / (x-cx)) * w + b
    s = (b + bb) * w / 2
elif b < 0:
    a = (0 - b) * (x-cx) / (y-cy)
    aa = (h - b) * (x-cx) / (y-cy)
    s = ((-b + h) * aa / 2) - ((-b) * a / 2)
elif b > h:
    a = (0 - b) * (x - cx) / (y - cy)
    aa = (h - b) * (x - cx) / (y - cy)
    s = (b * a / 2) - ((b-h) * aa / 2)

print(s, end=' ')
print(t)

Submission status: Accepted

Solution code:

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

w = float(W)
h = float(H)

print ( w * h / 2.0 )

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

else:
    print (0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#python ABC_130_C.py

line = list(map(int, input().split(" ")))

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

S = W*H/2

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

print(S,flag)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print('{0} {1}'.format(ans,multi))

Submission status: Accepted

Solution code:
import sys
from math import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b
# s = input()


W, H, x, y = map(int, input().split())
ans1 = str((W * H) / 2)

ans2 = "0"
cnt = 0
if H % 2 == 0 and y == H // 2:
    cnt += 1
if W % 2 == 0 and x == W // 2:
    cnt += 1

# nx = min(x, W - x)
# ny = min(y, H-y)
# if nx * Y == ny * X:
#     ans += 2
if cnt >= 2:
    ans2 = "1"
print(ans1, ans2)

Submission status: Accepted

Solution code:
w,h,x,y = map(float,input().split())
s = float(w*h/2)
d = 0
if h*x/w == y and x != 0 and x != w:
    d = 1
elif -(h*x/w) + h == y and x != 0 and x != w:
    d = 1
print("{0} {1}".format(s,d))

Submission status: Accepted

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

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



mino = "{0:.6f}".format(w*h/2)
if w==x*2 and h==y*2:
  out = 1
else:
  out = 0

print(str(mino) + " " + str(out))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    W, H, x, y = [int(_) for _ in raw_input().split()]
    ans = W * H / 2.0
    if (W % 2 == 0 and x == W/2) and (H % 2 == 0 and y == H/2):
        mul = 1
    else:
        mul = 0
    print ans, mul

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W,H,x,y=map(int,input().split())
# 全部半分になるはず
ans = (W*H)/2
if W/2 == x and H/2 == y:
    print('{} {}'.format(ans,1))
else:
    print('{} {}'.format(ans,0))

Submission status: Accepted

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

Submission status: Accepted

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

ans = W * H * 0.5
flg = 1 if x == W * 0.5 and y == H * 0.5 else 0

print(ans, flg)

Submission status: Accepted

Solution code:

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter
from collections import deque

input = sys.stdin.readline

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

if W*y == H*x and (y - H)*W == - H*x:
    multiple = 1
else:
    multiple = 0

print((H*W)/2, multiple)

Submission status: Accepted

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

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

def main():
    input = sys.stdin.readline
    W, H, x, y = map(int, input().split())
    area = W * H / 2
    way = int(2*x == W and 2*y == H)
    print('{} {}'.format(area, way))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def C(W, H, x, y):
    return W*H/2, int(W/2 == x and H/2 == y)


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

Submission status: Accepted

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

area = W * H / 2.0

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

Submission status: Accepted

Solution code:
inputa = list(map(int, input().split()))
 
S = inputa[0] * inputa[1] / 2
 
if inputa[0] / 2 == inputa[2]:
  if inputa[1] / 2 == inputa[3]:
    print (S, " 1")
    exit(0)
print (S, " 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:
    flag = 1
else:
    flag = 0
print(ans, flag)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

menseki = float(W * H * 0.5)

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

# elif x == W and (y == 0 or y == H):
#     flag = 1

# elif y == H and (x == 0 or x == H):
#     flag = 1

print(menseki,flag)

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
W, H, x, y = (float(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())

square = w * h / 2

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

print(square, result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

W,H,x,y = Is()
a = 1 if x == W/2 and y == H/2 else 0
print(W*H/2,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:
def resolve():
    (W, H, x, y) = list(map(int, input().split(" ")))
    if x == (W/2) and y == (H/2):
        print("{:.6f} {}".format(float(W*H/2), 1))
        return
    else:
        print("{:.6f} {}".format(float(W*H/2), 0))
        return


if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
W, H, x, y = list(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())
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())


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
w, h, x, y = map(int, input().split())
print(w * h / 2, 0 + (x == w / 2 and y == h / 2))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

if abs(W / 2 - float(x)) < 1e-9 and abs(H / 2 - float(y)) < 1e-9:
    print((W * H) / 2, 1)
else:
    print((W * H) / 2, 0)

Submission status: Accepted

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

half_area = w * h / 2
center = (w/2, h/2)

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

Submission status: Accepted

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

Submission status: Accepted

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

W = int(W)
H = int(H)
x = int(x)
y = int(y)

S = W * H / 2

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

print(S, f)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

w, h, x, y = li()

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(i) for i in input().split()]

answer = W * H / 2 

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

print(' '.join([str(answer), str(count)]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max = W*H/2.0

a = W/2
b = H/2

gap = 0.000000001
flag = 0

if(abs(x-a) < gap and abs(y-b) < gap):
    flag = 1

print('{:.6f} {}'.format(max, flag))

Submission status: Accepted

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

half=w*h/2

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

print(str(half)+" "+str(multi))

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(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:
from sys import exit

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

square = W * H / 2

ans = 0

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

print(square, ans)

Submission status: Accepted

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

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