Problem:


Score : 100 points

Problem Statement

There are H rows and W columns of white square cells.

You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.

How many white cells will remain?

It can be proved that this count does not depend on what rows and columns are chosen.

Constraints

All values in input are integers.

1 \leq H, W \leq 20

1 \leq h \leq H

1 \leq w \leq W

Input

Input is given from Standard Input in the following format:

H W
h w

Output

Print the number of white cells that will remain.

Sample Input 1

3 2
2 1

Sample Output 1

1

There are 3 rows and 2 columns of cells. When two rows and one column are chosen and painted in black, there is always one white cell that remains.

Sample Input 2

5 5
2 3

Sample Output 2

6

Sample Input 3

2 4
2 4

Sample Output 3

0



Sample input:
3 2
2 1


Sample output:
1

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

white = H * W
cross = h * w
black = h * W + H * w - cross

ans = white - black
print(ans)

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
sh, sw = map(int, input().split())
ans = (h - sh) * (w - sw)
print(ans)

Submission status: Accepted

Solution code:
HW = input()
HW_ = HW.split()
H = int(HW_[0])
W = int(HW_[1])
hw = input()
hw_ = hw.split()
h = int(hw_[0])
w = int(hw_[1])

ans = H * W - (h * W + w * H - h * w)
print(ans)

Submission status: Accepted

Solution code:
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

print ( (H-h)*(W-w))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
ans = (H - h) * (W - w)
print(ans)

Submission status: Accepted

Solution code:
H, W=map(int, input().split())
h, w=map(int, input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
answer = 0
retu = H-h
tate = W-w

answer = retu * tate
print(answer)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H * W - h * W - H * w + h * w
print(ans)

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
h1,w1 = map(int,input().split())
whole = h*w

print(whole - w*h1 - abs(h-h1)*w1)

Submission status: Accepted

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

ans = W*H - (W*h+H*w-w*h)
print(ans)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print(H*W-(h*W+H*w-h*w))

Submission status: Accepted

Solution code:
H,W = list(map(int,input().split()))
h,w = list(map(int,input().split()))

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - h*W - H*w + h*w

print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

# 塗る
print(H*W-(h*W+H*w-h*w))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H*W)-(h*W+(w*(H-h))))

Submission status: Accepted

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

def main():
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    all_cells = H * W
    black_cells = h * W + w * H - (h * w)
    print(all_cells - black_cells)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
a,b = map(int,input().split())

white = (H * W) - (W * a) - ((H - a) * b)

print(white)

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    print(H * W - (h * W + w * H - h * w))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H,W = list(map(int,input().strip().split()))
h,w = list(map(int,input().strip().split()))
all = H * W
minar = H * w + h * W - h * w
ans = all - minar
print(ans)

Submission status: Accepted

Solution code:
h , w = map(int,input().split())
h_0 , w_0 = map(int,input().split())

print((h - h_0) * (w - w_0))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((W-w)*(H-h))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
a = H * W
x = W * h
y = (H - h) * w
print(a - (x + y))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(h*W+w*H)+h*w)

Submission status: Accepted

Solution code:
a, b=map(int, input().split())
h, w=map(int, input().split())
x=a*b
y=h*b
z=w*a
k=h*w
final=x-y-z+k
print(final)

Submission status: Accepted

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())
ans=(W-w)*(H-h)
print(ans)

Submission status: Accepted

Solution code:
W,H=map(int,input().split())
w,h=map(int,input().split())
print(W*H-w*H-W*h+h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w =  map(int, input().split())
print(H*W - h*W - H*w + h*w)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    H, W = list(map(int, input().rstrip('\n').split()))
    h, w = list(map(int, input().rstrip('\n').split()))
    print((H - h) * (W - w))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
S=H*W
Hw=H*w
Wh=W*h
wh=w*h
print(S-Hw-Wh+wh)

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
ans = H * W
ans = ans - H * w -h * W
ans = ans + h * w
print(ans)

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
a, b = map(int, input().split())

print(h*w - (h*b + w*a - a*b))

Submission status: Accepted

Solution code:
H , W = map(int,input().split())
h , w = map(int,input().split())

print(( H - h ) * (W - w))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W -h*W-H*w+h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-H*w-W*h+h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
ans = H*W
if h*W<ans:
    ans -= h*W
    if (H-h)*w<ans:
        ans -= (H-h)*w
        print(ans)
    else:
        print(0)
else:
    print(0)

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W-h*W-(w*(H-h)))

Submission status: Accepted

Solution code:
'''A - White Cells
https://atcoder.jp/contests/abc121/tasks/abc121_a

>>> main([3, 2], [2, 1])
1
>>> main([5, 5], [2, 3])
6
>>> main([2, 4], [2, 4])
0'''


def main(amount, portion):
    print((amount[0] - portion[0]) * (amount[1] - portion[1]))


if __name__ == "__main__":
    amount = list(map(int, input().split(' ')))
    portion = list(map(int, input().split(' ')))

    main(amount, portion)

Submission status: Accepted

Solution code:
H ,W = map(int,input().split())
h ,w = map(int,input().split())

massum = H * W
amariH = H - h
amariW = W - w
result = massum - (h * W + w * (H - h))
print(result)

Submission status: Accepted

Solution code:
INPUT = [input().split() for l in range(2)]
H=int(INPUT[0][0])
W=int(INPUT[0][1])
h=int(INPUT[1][0])
w=int(INPUT[1][1])
print(H*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:
L1 = list(map(int, input().split()))
L2 = list(map(int, input().split()))
print((L1[0]-L2[0])*(L1[1]-L2[1]))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w,=map(int,input().split())

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(H*w+W*h-h*w))

Submission status: Accepted

Solution code:
H, W = (int(x) for x in input().split())
h, w = (int(x) for x in input().split())
print(int((H-h)*(W-w)))

Submission status: Accepted

Solution code:
H, W = map(int, input().split(" "))
h, w = map(int, input().split(" "))

print(H * W - h * W - w * H + h * w)

Submission status: Accepted

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

print(H * W - ((h*W + w*H) - h*w))

Submission status: Accepted

Solution code:
H, W = tuple(map(int, input().split()))
h, w = tuple(map(int, input().split()))
print((H - h) * (W - w))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - (h*W + w*H - h*w))

Submission status: Accepted

Solution code:
H,W = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    c, d = list(map(int, input().rstrip('\n').split()))
    print((a- c) * (b - d))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    print((H - h) * (W - w))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())


print(H*W-(h*W+H*w-h*w))

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
white = H*W
black = h*W+w*(H-h)
print(white-black)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - (h*W + w*H - h*w)
print(ans)

Submission status: Accepted

Solution code:
h,w,a,b=map(int,open(0).read().split());print(h*w-a*w-b*h+a*b)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-h*W-w*H+h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W-h*W-w*H+w*h)

Submission status: Accepted

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

H, W = map(int, raw_input().split())
h, w = map(int, raw_input().split())

ans = (H*W) - ((h*W + w*H) - h*w)

print ans

Submission status: Accepted

Solution code:
a,b=[int(s) for s in input().split()]
aa,bb=[int(s) for s in input().split()]
print((a-aa)*(b-bb))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
lw=H*W-(h*W+H*w-h*w)
print(lw)

Submission status: Accepted

Solution code:
H,W = map(int,input().split(" "))
h,w = map(int,input().split(" "))

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

ans=H*W-(h*W+(H-h)*w)
print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W - h*W - H*w + h*w)

Submission status: Accepted

Solution code:
hh,ww = map(int, input().split())
h, w = map(int, input().split())
s = hh*ww - h*ww - hh*w + h*w
print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
print((a[0]-b[0])*(a[1]-b[1]))

Submission status: Accepted

Solution code:
(H,W)=(int(i) for i in input().split())
(h,w)=(int(i) for i in input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

whole = H*W
points_row = h * W
points_column = w * H
duplicates = h * w

print(whole - (points_row + points_column - duplicates))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print( H* W - (H * w + h * W - h * w))

Submission status: Accepted

Solution code:
H1, W1 = map(int,input().split())
h2, w2 = map(int,input().split())

print((H1-h2) * (W1-w2))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H*W)-(h*W)-((w*H-h*w)))

Submission status: Accepted

Solution code:
h, w = list(map(int, input().split()))
r, c = list(map(int, input().split()))
print((h - r) * (w - c))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - (h*W+w*H-h*w)
print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W-h*W-w*H+h*w)

Submission status: Accepted

Solution code:
#2019/09/18
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h) * (W-w))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
v=h*w
print(H*W-(h*W+w*H-v))

Submission status: Accepted

Solution code:
#19:53
H,W = map(int,input().split())
h,w = map(int,input().split())
print( (H-h) * (W-w) )

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
white=H*W-h*W-w*H+h*w
print(white)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
answer = (H - h) * (W - w)
print(answer)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
f = lambda x,y:x-y if x>y else 0
print(f(H, h)*f(W, w))

Submission status: Accepted

Solution code:
def main():

    H, W = map(int, input().split())
    h, w = map(int, input().split()) 
    print(H * W - h * W - H * w + h * w)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H,W =map(int,input().split())
h,w =map(int,input().split())
print(H*W-h*W-w*H+h*w)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(max(H*W-h*W-w*H+h*w,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
sh, sw = map(int, input().split())

print((h - sh) * (w - sw))

Submission status: Accepted

Solution code:
H,W = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c, d = map(int, input().split())
print (((a - c) * (b - d)))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
n = h*W+w*(H-h)
print(H*W-n)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print((H*W)-((H*w)+(W*h)-(h*w)))

Submission status: Accepted

Solution code:
h,w= map(int,input().split())
a,b= map(int,input().split())
print(h*w-a*w-b*h+a*b)

Submission status: Accepted

Solution code:
H,W,h,w=map(int,open(0).read().split())
print((W-w)*(H-h))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
A = H * W - h * W - w * H + h * w
print(A)

Submission status: Accepted

Solution code:
def main():
    H, W = [int(i) for i in input().split()]
    h, w = [int(i) for i in input().split()]
    print((H-h)*(W-w))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print (H * W - h * W - H * w + h * w)

Submission status: Accepted

Solution code:
length, width = input().split()
length, width = int(length),int(width)
x, y = input().split()
x,y = int(x),int(y)
 
print((length-x) * (width-y))

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]

c,d = [int(i) for i in input().split()]

print((a-c)*(b-d))

Submission status: Accepted

Solution code:
#121a
A,B=map(int,input().split())
a,b=map(int,input().split())
print((A-a)*(B-b))

Submission status: Accepted

Solution code:
H, W=map(int, input().split())
h, w=map(int, input().split())

print(H*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
H,W=map(int,input().split())
h,w=map(int,input().split())

print(H*W-h*W-H*w+w*h)

Submission status: Accepted

Solution code:
List=[list(map(int,input().split())) for i in range(2)]
H=List[0][0]
W=List[0][1]
h=List[1][0]
w=List[1][1]
white=H*W-h*W-H*w+h*w
print(white)

Submission status: Accepted

Solution code:
H,W = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print(H*W-h*W-(w*(H-h)))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*W-w*H+h*w)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
print((A[0]-B[0])*(A[1]-B[1]))

Submission status: Accepted

Solution code:
H, W = list(map(int,input().split()))
h, w = list(map(int,input().split()))

Hh = H -h
Ww = W - w
print(Hh * Ww)

Submission status: Accepted

Solution code:
H, W=map(int,input().split())
h, w=map(int,input().split())
print(H*W-(h*W+H*w-h*w))

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print((H*W) - (h*W) - (w*(H-h)))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    
    print(H*W - W*h - (H-h)*w)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())


print(H*W - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W-((W*h+H*w)-(h*w)))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h) * (W-w))

Submission status: Accepted

Solution code:
s=list(input().split())
t=list(input().split())
sa=int(s[0])
sb=int(s[1])
ta=int(t[0])
tb=int(t[1])

total=sa*sb
leave=total-(ta*sb+tb*(sa-ta))

print(leave)

Submission status: Accepted

Solution code:

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

H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

print((H - h)*(W - w))

Submission status: Accepted

Solution code:
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

ans = (H - h) * (W - w)
print(ans)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-(w*H+h*W-w*h))

Submission status: Accepted

Solution code:
H,W=input().split()
print(eval('('+H+'-'+input().replace(' ',')*('+W+'-')+')'))

Submission status: Accepted

Solution code:
X,Y = [int(i) for i in input().split()]
x,y = [int(i) for i in input().split()]
print(X*Y - (x*Y + y*(X-x)))

Submission status: Accepted

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

def main():
    H,W = map(int,input().split())
    h,w = map(int,input().split())
    print(H*W -h*W -w*(H-h))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print( a[0]*a[1]-(a[0]*b[1] + a[1]*b[0] -b[0]*b[1]))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
total = H * W
print(total - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
hh, ww = map(int, input().split())
print(h * w - hh * w - h * ww + hh * ww)

Submission status: Accepted

Solution code:
import sys

H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W-h*W-w*H+h*w)

Submission status: Accepted

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

H, W = map(int, input().split())
h, w = map(int, input().split())
ans = (H-h)*(W-w)
print(ans)

Submission status: Accepted

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

H,W = MAP()
h,w = MAP()

print(H*W-(h*W+w*H)+h*w)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(H*W-((h*W)+(w*H)-(h*w)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
aa,bb=map(int,input().split())
aaa=a-aa
bbb=b-bb
print(int(aaa*bbb))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

s=(H-h)*(W-w)

print(s)

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W - (h*W)-(w*H)+(h*w))

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:

a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c*b-a*d+c*d)

Submission status: Accepted

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

def main():
    H,W = map(int, input().split())
    h, w = map(int, input().split())

    return H * W - h * W - w * H + h * w
    
if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-H*w-h*W+h*w)

Submission status: Accepted

Solution code:
H, W = map(int,input().split())
h, w = map(int,input().split())

print(H * W - h * W - w * H + h * w)

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(H*W - W*h - (H-h)*w)

Submission status: Accepted

Solution code:
H, W =map(int,input().split())
h, w =map(int,input().split())
print(H*W-h*W-w*H+h*w)

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

white = 0
for i in range(1,H+1):
    if i <= h:
        continue
    for j in range(1,W+1):
        if j <= w:
            continue
        white +=1
print(white)

Submission status: Accepted

Solution code:
H, W = map(int, input().split(" "))
h, w = map(int, input().split(" "))

print(H * W + h * w - H * w - h * W)

Submission status: Accepted

Solution code:
H , W = list(map(int,input().split()))
h , w = list(map(int,input().split()))
print((H-h) * (W - w))

Submission status: Accepted

Solution code:
H,W = map(int, input().split())
h,w = map(int, input().split())

print(max((H-h)*(W-w),0))

Submission status: Accepted

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

H,W = inpl()
h,w = inpl()

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print(H*W-(H*w+W*h-h*w))

Submission status: Accepted

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

print((a-c)*(b-d))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(int((H - h) * (W - w)))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = (H-h) * (W-w)
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

mtx = np.ones([H, W])
# print(mtx)
mtx[:h] = 0
mtx[:, 0:w] = 0
# print(mtx)
print(np.count_nonzero(mtx))

Submission status: Accepted

Solution code:
#ABC121 A
H,W = list(map(int, input().split()))
h,w = list(map(int, input().split()))
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H,W = list(map(int,input().split()))
h,w = list(map(int,input().split()))
print((H-h)*(W-w))

Submission status: Accepted

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

H, W = map(int,input().split())
h, w = map(int,input().split())
print(H*W-h*W-H*w+h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

zen = H * W
kuro = h * W + w * H - w * h

print(zen - kuro)

Submission status: Accepted

Solution code:
H, W = list(map(int, input().split()))
h,w = list(map(int, input().split()))
print(H*W - (h*W + w*H - h*w))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

ans=(H - h)*(W-w)
print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

all_cell = H * W
black_cell = h * W + w * H - w * h

print(all_cell - black_cell)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((W - w) * (H - h))

Submission status: Accepted

Solution code:
H, W = map(int,input().split())
h, w = map(int,input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
def main():
  H, W = map(int, input().split())
  h, w = map(int, input().split())
  
  print((H-h)*(W-w))

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))
print(H * W - (h * W + w * H - h * w))

Submission status: Accepted

Solution code:
def resolve():
    H,W = map(int,input().split())
    Hs,Ws = map(int,input().split())
    ans = H*W
    ans -= Hs*W
    ans -= Ws*(H-Hs)
    print(ans)
resolve()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - h*W - w*H + w*h)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
row, col = map(int, input().split())
nr, nc = map(int, input().split())

all = row * col
colored_row = nr * col
colored_col = nc * row
double = nr * nc

colored = all - colored_row - colored_col + double

print(colored)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# cook your dish here
H,W=map(int,input().split())
White=H*W
h,w=map(int,input().split())
print(White-(h*W)-(H-h)*w)

Submission status: Accepted

Solution code:
hi, wi = map(int, input().split())
ho, wo = map(int, input().split())

if 1 <= hi <= 20 and 1 <= wi <= 20 and 1 <= ho <= hi and 1 <= wo <= wi:
    white = hi * wi
    black = hi * wo + ho * wi - ho * wo
    print(white - black)
else:
    print('hoge')

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    return H*W - H*w - h*W + h*w

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())

P=(h*W+w*H)-h*w

print((H*W-P))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W+h*w-h*W-w*H)

Submission status: Accepted

Solution code:
HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
print((HW[0]-hw[0])*(HW[1]-hw[1]))

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(h*W+H*w)+h*w)

Submission status: Accepted

Solution code:
H, W=map(int, input().split())
h, w=map(int, input().split())
ans=(W-w)*(H-h)
print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (h*W + H*w - (h*w)))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())
white=H*W
black= h*W+H*w-h*w
print(white-black)

Submission status: Accepted

Solution code:
H, W = (int(i) for i in input().split())
h, w = (int(i) for i in input().split())
ans = H * W
sel = h * W + w * (H - h)
ans -= sel
print(ans)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H * W - (h * w) - (H - h) * w - (W - w) * h
print(ans)

Submission status: Accepted

Solution code:
H,W = list(map(int, input().split()))
h,w = list(map(int, input().split()))
print((H-h) * (W-w))

Submission status: Accepted

Solution code:
hh, ww = map(int,input().split())
h, w = map(int,input().split())
print((hh-h)*(ww-w))

Submission status: Accepted

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
print(H*W-((h*W)+(w*H)-h*w))

Submission status: Accepted

Solution code:
H, W = map(int,input().split())
h, w = map(int,input().split())
print((H-h) * (W-w))

Submission status: Accepted

Solution code:
H,W =map(int,input().split())
h,w = map(int,input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H, W = map(int, input().split(' '))
h, w = map(int, input().split(' '))
print((H - h) * (W - w))

Submission status: Accepted

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

H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

print(H*W-(W*h+H*w-h*w))

Submission status: Accepted

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

print((a-c)*(b-d))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
C,D = map(int,input().split())

print((A-C)*(B-D))

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
h,w=map(int,input().split())

print((H*W)-(h*W+w*H-(h*w)))

Submission status: Accepted

Solution code:
def solve():
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    return (H - h) * (W - w)  # (h * W + w * H + h * w)


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

Solution code:
H,W=input().split()
H,W=int(H),int(W)
h,w=input().split()
h,w=int(h),int(w)

print((H-h)*(W-w))

Submission status: Accepted

Solution code:
import math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split()
inputb = input().split()

a = int(inputa[0])
b = int(inputa[1])
# c = int(inputa[2])

x = int(inputb[0])
y = int(inputb[1])

ans = a*b - x*b - y*a + x*y
print(ans)

Submission status: Accepted

Solution code:
H,W=map(int, input().split())
h,w=map(int, input().split())
print((H-h)*(W-w))

Submission status: Accepted

Solution code:
import numpy as np

def test():
    H,W = map(int,input().split())
    h,w = map(int,input().split())

    data = np.ones((H,W))
    data[:h,:] = 0
    data[:,:w] = 0
    print(int(data.sum()))


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

area = H * W

area = area - (h * W)

if area != 0:
  H -= h
  area -= (w * H)
print(area)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = (H*W) - (h*W) - (H-h)*w
print(ans)