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

ans=H*W-h*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-h)*(W-w))

Submission status: Accepted

Solution code:
H,W=list(map(int,input().split()))
h,w=list(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())
#print(H,W,h,w)
print((H-h)*(W-w))

Submission status: Accepted

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

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

print(H * W - black)

Submission status: Accepted

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

white = int(H * W)
black = int(H*w + W*h)
white = white - black + h*w

print(white)

Submission status: Accepted

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

buff = []
for w1 in range(W):
    buff.append([0 for h1 in range(H)])

for w2 in range(w):
    for x in range(H):
        buff[w2][x] = 1
    for h2 in range(h):
        for x in range(W):
            buff[x][h2] = 1
c = 0
for b in buff:
    for a in b:
        if a == 0:
            c+=1
print(c)

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

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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*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-h)*(W-w))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def abc():
    ROW, COL = map(int, input().rstrip().split())
    row, col = map(int, input().rstrip().split())

    squares = ROW * COL
    squares -= (row * COL)
    squares -= (col * (ROW - row))
    print(squares)


abc()

Submission status: Accepted

Solution code:
inp = input().split()
all_h = int(inp[0])
all_w = int(inp[1])

inp_select = input().split()
h = int(inp_select[0])
w = int(inp_select[1])

print((all_h-h)*(all_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:
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:
height,width=map(int,input().split())
h,w=map(int,input().split())
print((height-h)*(width-w))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
H, W = map(int, input().split())
h, w = map(int, input().split())

white = H * W
white = white - 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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lhlw = input().split()
hw = input().split()

lh_h = int(lhlw[0]) - int(hw[0])
lw_w = int(lhlw[1]) - int(hw[1])
result = lh_h * lw_w
print(result)

Submission status: Accepted

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

white = H * W
black = h * W + H * w -(h * w)

print(white - black)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
HW = input().split()
hw = input().split()
HW[0] = int(HW[0])
HW[1] = int(HW[1])
hw[0] = int(hw[0])
hw[1] = int(hw[1])
count = 0

HW_list = [[0] * HW[1] for i in range(HW[0])]

for i in range(0, hw[0]):
    for j in range(0, len(HW_list[0])):
        HW_list[i][j] = 1

for i in range(0, hw[1]):
    for j in range(0, len(HW_list)):
        HW_list[j][i] = 1

for i in range(0, HW[0]):
    for j in range(0, HW[1]):
        if HW_list[i][j] == 0:
            count += 1

print(count)

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] = [int(i) for i in input().split()]
[h, w] = [int(i) for i in input().split()]

white_square_number = (H-h) * (W-w)
print(int(white_square_number))

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-h)*(W-w)

print(ans)

Submission status: Accepted

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

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

print(white)

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 - H * w + h * w)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 - 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:
H, W = map(int, input().split())
h, w = map(int, input().split())

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc121/tasks/abc121_a

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)-(W*h+H*w)+(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 = map(int, input().split())
h, w = map(int, input().split())

grid = H * W

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

print(grid)

Submission status: Accepted

Solution code:
h, w = [ int(v) for v in input().split() ]
a, b = [ int(v) for v in input().split() ]
print((h-a)*(w-b))

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())
ah,aw = map(int,input().split())
print((h-ah)*(w-aw))

Submission status: Accepted

Solution code:
l=[]
for i in range(2):
  l.append(input().split())
a=int(l[0][0])-int(l[1][0])
b=int(l[0][1])-int(l[1][1])
print(a*b)

Submission status: Accepted

Solution code:
HW = input().split()
hw = input().split()

H = int(HW[0])
W = int(HW[1])
h = int(hw[0])
w = int(hw[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
H = data[0]
W = data[1]
data = list(map(int,input().split()))
h = data[0]
w = data[1]
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:
# -- coding:utf-8 --
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:
# abc121_a
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())

line = H - h
column = W - w
print(line * column)

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


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


def ceil(a, b):
    return (a + b - 1) // b


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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:

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


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-h)*(W-w))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

kuro = ((H * w) + (W * h)) - (w * h)
siro = (H * W) - kuro

print(siro)

Submission status: Accepted

Solution code:
lst1 = input().split()
lst2 = input().split()
H = int(lst1[0])
W = int(lst1[1])
h = int(lst2[0])
w = int(lst2[1])

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

print(ans)

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

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

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 = [int(e) for e in input().split(" ")]
h, w = [int(e) for e in input().split(" ")]

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

Submission status: Accepted

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

print(str(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-W*h-H*w+h*w)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    list_1=input().split()
    H=int(list_1[0])
    W=int(list_1[1])

    list_2=input().split()
    h=int(list_2[0])
    w=int(list_2[1])
    
    Ans = (H-h)*(W-w)
    print(Ans)

Submission status: Accepted

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

if h == H or w == H:
    print(0)
else:
    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:
a, b = input().split()
a, b = int(a), int(b)

c,d = input().split()
c,d = int(c), int(d)

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 - H*w + h*w)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 121
# https://atcoder.jp/contests/abc121
import sys
#import numpy as np

s2nn = lambda s: map(int, s.split(' '))
ss2nn = lambda ss: map(int, ss)
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    h, w = i2nn()
    n = (H - h) * (W - w)
    print(n)

main()

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 121
# https://atcoder.jp/contests/abc121
import sys

s2nn = lambda s: map(int, s.split(' '))
ss2nn = lambda ss: map(int, ss)
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    h, w = i2nn()
    n = (H - h) * (W - w)
    print(n)

main()

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 121
# https://atcoder.jp/contests/abc121
import sys
import numpy as np

s2nn = lambda s: map(int, s.split(' '))
ss2nn = lambda ss: map(int, ss)
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    h, w = i2nn()
    n = (H - h) * (W - w)
    print(n)

main()

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:
HW = list(map(lambda x: int(x), input().split()))
H = HW[0]
W = HW[1]

hw = list(map(lambda x: int(x), input().split()))
h = hw[0]
w = hw[1]

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(H: int, W: int, h: int, w: int):
    res = (H-h)*(W-w)
    print(res)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    h = int(next(tokens))  # type: int
    w = int(next(tokens))  # type: int
    solve(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("{}".format((H-h)*(W-w)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print(int((l[1]-s[1])*(l[0]-s[0])))

Submission status: Accepted

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

Submission status: Accepted

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

h, w = map(int, input().split())
delH, delW = map(int, input().split())

print((h-delH)*(w-delW))

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*W-H*w-h*W+h*w)

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

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

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 + h*W -h*w))

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:
def main():
    H,W=list(map(int,input().split(' ')))
    h,w = list(map(int,input().split(' ')))
    print(H*W - W*h - (H-h)*w)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


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

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 = [int(i) for i in input().split()]
h, w = [int(i) for i in 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 - h) * (W - w))

Submission status: Accepted

Solution code:
H1,W1=map(int,input().split())
H2,W2=map(int,input().split())
print((W2-W1)*(H2-H1))

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:
from sys import stdin
sH, sW = stdin.readline().split()
sh, sw = stdin.readline().split()
H, W = int(sH), int(sW)
h, w = int(sh), int(sw)
print(H*W - h*W - w*H + h*w)

Submission status: Accepted

Solution code:
H, W = map(int, input().strip().split())
h, w = map(int, input().strip().split())
print((H - h)*(W - 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*W-H*w-W*h+h*w)

Submission status: Accepted

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

ans = (h-a) * (w-b)
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 - w*h))

Submission status: Accepted

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

H -= h
W -= w

print(H*W)

Submission status: Accepted

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

S = H * W
s = h * W + w * H - h * w

print(S - s)

Submission status: Accepted

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

field = H * W
white = field - h * W - (w * (H - h))

print(white)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
# input
H, W = map(int, input().split())
h, w = map(int, input().split())

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    H, W = [int(x) for x in stdin.readline().rstrip().split()]
    h, w = [int(x) for x in stdin.readline().rstrip().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-h)*(W-w))

Submission status: Accepted

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

total = H * W
row_black = W * h
col_black = H * w
duplicate = h * w

print(total - row_black - col_black + duplicate)

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:
W, H = map(int, input().split())
sw, sh = map(int, input().split())

print(W*H -sw*H -sh*W + sw*sh)

Submission status: Accepted

Solution code:
# from sys import exit
H, W = [int(n) for n in input().split()]
h, w = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()
print(H*W - h*W - H*w + h*w)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
rr = lambda: sys.stdin.readline().strip()
ri = lambda: int(rr())
rs = lambda: [int(_) for _ in rr().split()]

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

print((H-h)*(W-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:
H,W = [int(i) for i in input().split()]
h,w = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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("{}".format((H-h)*(W-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 = (int(j) for j in input().split())
h,w = (int(j) for j in 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()))
h, w = list(map(int, input().split()))  
ans = (H - h)*(W - w)
print(ans)

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    input_list = list(map(int, input().split()))
    H = input_list[0]
    W = input_list[1]
    input_list = list(map(int, input().split()))
    h = input_list[0]
    w = input_list[1]

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

    print(answer)

Submission status: Accepted

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

sum = H * W
cnt = (W * h) + (w * (H - h))
print(sum - cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(white)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
###############################################################################

from bisect import bisect_left as binl

def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return map(int, input_tuple)


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


###############################################################################


def main():
    H, W = intin()
    h, w = intin()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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((H-h)*(W-w))

Submission status: Accepted

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

x=A-a
y=B-b

print(int(x*y))

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 * W - ( h * W + w * H - h * w))

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

    print(calc)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = (a[0]-b[0])*(a[1]-b[1])
print(ans)

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*b-c*b-d*a+c*d)

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*W - h*W - w*H + h * w)

Submission status: Accepted

Solution code:
A = input().split()
B = input().split()
Cell = int(A[0])*int(A[1])
uni = int(A[0])*int(B[1]) + int(A[1])*int(B[0])
add = int(B[0])*int(B[1])
ans = Cell - uni + add
print(ans)

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:
HW=input().split()
hw=input().split()
print((int(HW[0])-int(hw[0]))*(int(HW[1])-int(hw[1])))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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