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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
a,b=[list(map(int, input().split())) for _ in range(2)]
print((a[0]-b[0])*(a[1]-b[1]))

Solution (Python):
s=input().split()
n=int(s[0]);m=int(s[1])
s=input().split()
n-=int(s[0]);m-=int(s[1])
print(n*m)

Solution (Python):

h, w = map(int, input().split())
c_h, c_w = map(int, input().split())
print(h * w - (h * c_w + w * c_h) + c_h * c_w)

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

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

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

Solution (Python):
usr1 = input()
usr2 = input()

lst1 = usr1.split()
lst2 = usr2.split()
numlst1=[]
numlst2=[]

for element in lst1:
    numlst1.append(int(element))

for element in lst2:
    numlst2.append(int(element))

print((numlst1[0] - numlst2[0])*(numlst1[1]-numlst2[1]))

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

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

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

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

Solution (Python):
import sys
original = sys.stdin.readline().strip().split(" ")
new = sys.stdin.readline().strip().split(" ")

H = int(original[0])
W = int(original[1])

h = int(new[0])
w = int(new[1])

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

print(result)

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

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

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

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

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

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

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


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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-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 pf(s): return print(s, flush=True)


def main():
    h,w = LI()
    a,b = LI()

    return (h-a) * (w-b)


print(main())

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

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

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

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

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

Solution (Python):

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

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

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

List = []
for i in range(H):
    l = []
    for j in range(W):
        l.append(0)
    List.append(l)

for i in range(h):
    for j in range(W):
        List[i][j] = 1
for i in range(H):
    for j in range(w):
        List[i][j] = 1

count = 0
for i in range(H):
    count += List[i].count(0)

print(count)

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

Solution (Python):

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

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

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

mas = [[0] * W for i in range(H)]

for h_i in range(h):
    mas[h_i] = [1] * W

for w_i in range(w):
    for i in range(H):
        mas[i][w_i] = 1

count = 0
for h_i in range(H):
    for w_i in range(W):
        if mas[h_i][w_i] == 0:
            count += 1
print(count)

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

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

Solution (Python):
h1,w1=map(int,input().split())
h2,w2=map(int,input().split())

print((h1-h2)*(w1-w2))

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

Solution (Python):
l1 = list(map(int,input().split(" ")))
l2 = list(map(int,input().split(" ")))

print((l1[0] - l2[0]) * (l1[1] - l2[1]))

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

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

Solution (Python):
lh, lw = map(int, input().split())
h, w = map(int, input().split())

print(lh * lw - lh * w - lw * h + h * w)

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

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

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

A = H * W
B = W * h + (H - h) * w

R = A - B

print(R)

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

Solution (Python):
s = [input().split() for i in range(2)]

a, b, c, d = int(s[0][0]), int(s[0][1]), int(s[1][0]), int(s[1][1])

sum_cells_count = a * b
row_cells_count = b * c
col_cells_count = (a - c) * d

filled_cells_count = row_cells_count + col_cells_count

blank_cells_count = sum_cells_count - filled_cells_count
print(blank_cells_count)

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

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

print("{}".format(mergin))

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

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

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

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


x=h*w
X=w*H
Y=h*W
Z=X+Y
print(H*W+x-Z)

Solution (Python):




def whiteCells(AllHeight,selectHeight,AllWidth,selectWidth):
	answer = (AllHeight-selectHeight)*(AllWidth-selectWidth)
	return answer


if __name__ == '__main__':
	H,W = map(int,input().strip().split(' '))
	hl,wl = map(int,input().strip().split(' '))
	solution = whiteCells(H,hl,W,wl)
	print("{}".format(solution))

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [H, W] = [int(input_raw[0]), int(input_raw[1])]
    input_raw = read_func().strip().split()
    [h, w] = [int(input_raw[0]), int(input_raw[1])]
    print (H - h) * (W - w)

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys

if __name__ == "__main__":
    para_list1 = list(map(int, input().split()))
    H = para_list1[0]
    W = para_list1[1]

    para_list2 = list(map(int, input().split()))
    h = para_list2[0]
    w = para_list2[1]

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

Solution (Python):

"""
Created on Sat Mar  9 21:53:23 2019

@author: yuta
"""

HW = list(map(int,input().split()))
hw = list(map(int,input().split()))
H = HW[0]
W = HW[1]
h = hw[0]
w = hw[1]

def main(A,B,a,b):
    print((A-a)*(B-b))
main(H,W,h,w)

Solution (Python):
a,b=(int(x) for x in input().split())
c,d=(int(y) for y in input().split())
print((a - c) * (b - d))

Solution (Python):
h, w = map(int, raw_input().split())
r, c = map(int, raw_input().split())
print (h - r) * (w - c)

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

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

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

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

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

main()

Solution (Python):
a,b = list(map(int,input().split()))
x,y=list(map(int,input().split()))
ret=(a-x)*(b-y)
print(ret)

Solution (Python):


def io_generator():
	return input()



def main(io):
	w,h= map(int, io().split())
	w1,h1= map(int, io().split())
	return (w-w1)*(h-h1)



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

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

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

Solution (Python):
H, W = map(int, input().rstrip().split(' '))
h, w = map(int, input().rstrip().split(' '))

row = H - h
col = W - w
r = row * col
print(r)

Solution (Python):
int_list = [list(map(int, input().split())) for i in range(2)]
answer = (int_list[0][0] - int_list[1][0]) * (int_list[0][1] - int_list[1][1])
print(answer)

Solution (Python):

import sys

def main():
	H, W = map(int, input().split(" "))
	h, w = map(int, input().split(" "))
	
	total = H - h
	total2 = W - w
	
	print(total * total2)
			
if __name__ == "__main__":
	main()

Solution (Python):
def white_cells(H: int, W: int, h: int, w: int)->int:
    return (H-h) * (W-w)


if __name__ == "__main__":
    H, W = map(int, input().split())
    h, w = map(int, input().split())
    ans = white_cells(H, W, h, w)
    print(ans)

Solution (Python):



import sys
import math





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


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

Solution (Python):
def getNM():
    return list(map(int, input().split()))
  
a,b = getNM()
c,d = getNM()

s = a*b
nuri = c*b+a*d-c*d
print(s-nuri)

Solution (Python):
original_height, original_width = map(int, input().split(' '))
blacken_height, blacken_width = map(int, input().split(' '))

print((original_height - blacken_height) * (original_width - blacken_width))

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

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

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

print (result)

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

Solution (Python):
h1, w1 = map(int, input().split())
h2, w2 = map(int, input().split())

print((h1 - h2) * (w1 - w2))

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

Solution (Python):
a,b=[int(x)-int(y)for x,y in zip(*[input().split()for _ in[0,0]])]
print(a*b)

Solution (Python):



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

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

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

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

Solution (Python):

W, H = [int(i) for i in raw_input().split()]
w, h = [int(i) for i in raw_input().split()]
print((W-w)*(H-h))

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

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

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

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

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

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

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

Solution (Python):


h,w = map(int, input().split())
hh,ww = map(int, input().split())

print((h-hh)*(w-ww))

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

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):
rr = lambda: input().strip()
rrm = lambda: list(map(int, rr().split()))

R, C = rrm()
Rx, Cx = rrm()
A = [[True] * C for _ in range(R)]
for r in range(Rx):
    A[r] = [False] * C
for c in range(Cx):
    for r in range(R):
        A[r][c] = False

print(+sum(sum(row) for row in A))

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

a=H*W
b=h*w

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

Solution (Python):
x, y = map(int, input().split())
n, m = map(int, input().split())
print((x-n)*(y-m))

Solution (Python):
import numpy as np

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

s=np.zeros((H,W))
for i in range(h):
    for j in range(W):
        s[i][j]=-1
for i in range(w):
    for j in range(H):
        s[j][i]=-1
        
count=0
for i in range(H):
    for j in range(W):
        if s[i][j]==0:
            count+=1
print(count)

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

Solution (Python):
import numpy as np

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

ones_h = np.ones((h, W, ))
zero_h = np.zeros((H-h, W, ))
sum_h = np.vstack([ones_h, zero_h])

ones_w = np.ones((H, w, ))
zero_w = np.zeros((H, W-w, ))
sum_w = np.hstack([ones_w, zero_w])


sum_result = sum_h + sum_w

print(np.sum(sum_result==0))

Solution (Python):

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

Solution (Python):
math_line = list(map(int,input().split()))
input_line = list(map(int,input().split()))

area = math_line[0]*math_line[1]
black_cell = math_line[0]*input_line[1] + math_line[1]*input_line[0]
duplicate =  black_cell - input_line[0]*input_line[1]
white_cell = area - duplicate

print(white_cell)

Solution (Python):
h, w = map(int, input().split())
hh, ww= map(int, input().split())

s = int(h*w)

print((s - (hh*w+ww*h))+hh*ww)

Solution (Python):
a = [input() for i in range(2)]
H, W = map(int, a[0].split())
h, w = map(int, a[1].split())
print((H-h)*(W-w))

Solution (Python):



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

S = H * W
buf = S - (h*W) 
result = buf - (H-h)*w
print(result)

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

    sum_cell = H * W
    v_sel = h * W
    h_sel = w * H
    dupli = h * w

    while_cell = sum_cell - (v_sel + h_sel - dupli)

    print(while_cell)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
input_list = [list(map(int, input().split())) for _ in range(2)]
x = input_list[0][0] - input_list[1][0]
y = input_list[0][1] - input_list[1][1]
print(x * y)

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

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

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

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

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

Solution (Python):
h,w = map(int,input().split(" "))

r,c = map(int,input().split(" "))

tot_cells = h*w

painted_cells = r*w + c*h - (r*c)

print(tot_cells-painted_cells)

Solution (Python):
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))

Solution (Python):
n,m = [int(i) for i in input().split()]
h,w= [int(i) for i in input().split()]
print((n-h)*(m-w))

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

dh = H - h
dw = W - w
area = dh * dw
print(area)

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

Solution (Python):
import numpy as np
H,W = map(int,input().split())
h,w = map(int,input().split())
matrix = np.ones((H,W))
h_num = np.random.choice(H,h,replace=False)
w_num = np.random.choice(W,w,replace=False)

for _ in h_num:
  matrix[_,:] = 0
for _ in w_num:
  matrix[:,_] = 0

print(int(np.sum(matrix)))

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

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

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

if H - h == 0 and W -w == 0:
    print("0")
else:
    print(abs((H - h)* (W - w)))

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

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

Solution (Python):


import sys


INF = float('inf')
MOD = 10 ** 9 + 7

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 LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def main():
    h, w = LI()
    a, b = LI()
    return (h - a) * (w - b)


print(main())

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

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

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

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

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

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

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

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

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

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

Solution (Python):


import numpy as np

A = [list(map(int, input().split())) for _ in range(2)]
A = np.array(A)
B = A[0,]-A[1,]
ANS = B[0]*B[1]
print(ANS)

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

Solution (Python):




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

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

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


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

Solution (Python):


A, B = list(map(int, input().split()))

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

print((A - a) * (B - b))

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

f = (a-c)*(b-d)

if f <= 0 :
    print(0)
else:
    print(f)

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

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

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

Solution (Python):

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

B_cells=h*W+w*H-h*w 
W_cells=H*W-B_cells 

print(W_cells)

Solution (Python):
if __name__ == "__main__":
    RW = list(map(int, input().split()))
    rw = list(map(int, input().split()))
    print(RW[0]*RW[1] - (RW[1]*rw[0] + RW[0]*rw[1]) + rw[0]*rw[1])

Solution (Python):
a, b= (int(i) for i in input().split()) 
c, d = (int(i) for i in input().split()) 
print(((a-c)*(b-d)))

Solution (Python):
from sys import stdin


def a(input_string):
    one, two = input_string
    H, W = [int(x) for x in one.split()]
    h, w = [int(x) for x in two.split()]
    all_one_matrix = []
    for i in range(H):
        all_one_matrix.append([])
        for j in range(W):
            all_one_matrix[i].append(1)
    for i in range(h):
        for j in range(len(all_one_matrix[i])):
            all_one_matrix[i][j] = 0
    for i in range(len(all_one_matrix)):
        for j in range(len(all_one_matrix[i])):
            if j in range(w):
                all_one_matrix[i][j] = 0
    count_0 = 0
    for i in range(H):
        for j in range(W):
            if all_one_matrix[i][j] == 1:
                count_0 += 1
    return count_0


def main():
    input_line = stdin.readlines()
    answer = a(input_line)
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

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

Solution (Python):

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

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

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

Solution (Python):

"""
Created on Sat Mar  9 21:07:57 2019

@author: iwata
"""

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

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

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

Solution (Python):
def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

H, W = reads()
h, w = reads()
print((H - h) * (W - w))

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

Solution (Python):
H,W = input().split(" ")
h,w = input().split(" ")

H = int(H)
W = int(W)
h = int(h)
w = int(w)

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

print(ans)

Solution (Python):
GR=input().split()
G2R2=input().split()
G=int(GR[0])
R=int(GR[1])
G2=int(G2R2[0])
R2=int(G2R2[1])
print(str(G*R-(G2*R+R2*G-G2*R2)))

Solution (Python):

'''
N=int(input())
N,M=list(map(int,input().split()))
S=input()

li=[]
for i in range(N):
    li.append(list(map(int,input().split())))
'''

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

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

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

Solution (Python):
h,w = map(int,input().split())
h2,w2 = map(int,input().split())

result = h*w  - w*h2 - (h-h2)*w2
print(result)

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

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

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

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

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

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

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

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

Solution (Python):
H,M =map(int,input().split())
h,m =map(int,input().split())
a=H*M
a=a-h*M-m*(H-h)
print(a)

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

Solution (Python):


input_line = input().split(" ")
draw = input().split(" ")

white = (int(input_line[0]) - int(draw[0])) * (int(input_line[1]) - int(draw[1]))

print(white)

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

Solution (Python):
H, W = map(int, input().split())
h, w = map(int, input().split())
retu = H -h
gyo = retu*w

print(retu*W-gyo)

Solution (Python):
x,y = map(int,input().split())
s,t = map(int,input().split())

print((x*y)-((s*y) + ((x-s)*t)))

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

Solution (Python):
import sys

def main():
    list = [[i for i in map(int, line.rstrip().split())] for line in sys.stdin.readlines()]
    a = (list[0][0] - list[1][0]) *  (list[0][1] - list[1][1])
    print(a)

if __name__ == '__main__':
    sys.exit(main())

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

Solution (Python):
N = [list(map(int,input().split())) for i in range(2)]
print( (N[0][0] - N[1][0])*(N[0][1] - N[1][1]) )

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

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

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

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

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

Solution (Python):
H, W = [int(i) for i in input().split(" ")]
h, w = [int(i) for i in input().split(" ")]
ans = (H * W) - (h * W) - (H * w) + (h * w)
print(ans)

Solution (Python):
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)

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

lst = [[0]*W for _ in range(H)]

for i in range(h):
    for j in range(W):
        lst[i][j] = 1
        
for i in range(H):
    for j in range(w):
        lst[i][j] = 1

ans = 0

for i in range(H):
    for j in range(W):
        if lst[i][j] == 0:
            ans += 1
            
print(ans)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
H = input()
h = input()
W = H.split()
w = h.split()
print(int(W[0]) * int(W[1]) - (int(W[0]) * int(w[1]) + (int(W[1]) - int(w[1])) * int(w[0])))

Solution (Python):


import numpy as np
H, W = map(int, raw_input().split())
h, w = map(int, raw_input().split())

array = np.zeros((H,W))

for i in range(0, h):
    for j in range(0, W):
        array[i][j] += 1

for i in range(0, w):
    for j in range(0, H):
        array[j][i] += 1

count = 0
for i in range(0, H):
    for j in range(0, W):
        if array[i][j] == 0 : count += 1

print count

Solution (Python):
h, w = input().split()
h = int(h)
w = int(w)

a, b = input().split()
a = int(a)
b = int(b)

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

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

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

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

dh = H - h
dw = W - w
area = dh * dw
print(area)

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

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

Solution (Python):
h,w = map(int,input().split())
hh,ww = map(int,input().split())
A = h*w
b = hh*w+ww*(h-hh)
res = A -b
print(res)

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

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

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

ans=[[0]*W for _ in range(H)]

for hh in range(h):
    for i in range(W):
        ans[hh][i]=1
for ww in range(w):
    for i in range(H):
        ans[i][ww]=1

sums=0
for ll in ans:
    sums+=sum(ll)

print(H*W-sums)

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

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

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

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

Solution (Python):


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

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

Solution (Python):
inp = [input() for _ in range(2)]
H, W = inp[0].split(" ")
h, w = inp[1].split(" ")
H = int(H)
W = int(W)
h = int(h)
w = int(w)
outp = H * W - h * W - H * w + h * w
print(outp)

Solution (Python):
def main():
    H, W = map(int, input().split())
    s_h, s_w = map(int, input().split())
    all_m = H * W
    del_h = s_h * W
    del_w = s_w * H
    zyu_huku = s_h * s_w
    nuri = (del_h + del_w) - zyu_huku
    remain = all_m - nuri
    print(remain)


if __name__ == '__main__':
    main()

Solution (Python):
h1, w1 = map(int, input().split())
h2, w2 = map(int, input().split())

print((h1 - h2) * (w1 - w2))