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

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

answer = (board[0]-select[0])*(board[1]-select[1])
print(answer)

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

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 * b) - (a * d) - (b * c) + (c * 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:
H,W,h,w = map(int,open(0).read().split())
print(max(H*W-h*w-(H-h)*w-(W-w)*h,0))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
n = int(sys.stdin.readline())
a, b = map(int, sys.stdin.readline().split())
c = list(map(int, sys.stdin.readline().split()))
s = [list(map(int,list(sys.stdin.readline()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

a = 100
b = 0.987654321
print('{0:06d}-{1:6f}'.format(a,b))  # 0埋め, 小数点出力桁指定時のときの出力
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)


mod = 1000000007

if __name__ == "__main__":
    H, W = map(int, sys.stdin.readline().split())
    h, w = map(int, sys.stdin.readline().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:
H, W = map(int, input().split())
h, w = map(int, input().split())
r = H*W - (h*W+(H-h)*w)

print(r)

Submission status: Accepted

Solution code:
N = input().split()
H = int(N[0])
W = int(N[1])

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

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:
#121 White Cells
H, W = map(int, input().rstrip().split())
h, w = map(int, input().rstrip().split())

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

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
a,b = list(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:
# coding: utf-8
# Your code here!

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

# print(H)
# print(W)

# print(h)
# print(w)

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

sel = a * b
d1 = b * c
d2 = (a - c) * d

result = sel -d1 -d2
print( result )

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def get_numbers():
    return map(int, input().split())

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

print((H - h) * (W - 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-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 numpy as np
H,W = map(int, input().split())
h,w = map(int, input().split())
matrix = [[1 if (i>w-1 and j>h-1) else 0 for i in range(W)] for j in range(H)]
print(np.sum(matrix))

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

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

ans = (w-a) * (h-b)

print(ans)

Submission status: Accepted

Solution code:
#0121
H, W = (int(_) for _ in input().split())
h, w =  (int(_) for _ in input().split())
total = H*W
remaining = total - (h*W + w*H - h*w)
print(remaining)

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


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

Submission status: Accepted

Solution code:
str_in = input().split()
height = int(str_in[0])
width  = int(str_in[1])

str_in = input().split()
hcut = int(str_in[0])
wcut = int(str_in[1])

ans = (height - hcut) * (width - wcut)
print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

H,W = map(int,input().split())
matrix = np.zeros((H,W))

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

for i in range(h):
  matrix[i,:] = 1
for i in range(w):
  matrix[:,i] = 1

print(int(H*W - np.sum(np.sum(matrix))))

Submission status: Accepted

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

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:
"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    H,W = map(int, sys.stdin.readline().split())
    h2, w2 = map(int, sys.stdin.readline().split())
    n=(H-h2) * (W-w2)
    print(n)

Submission status: Accepted

Solution code:
def main43():
    data1 = input().split()
    hw1 = []
    for i in range(2):
        hw1.append(int(data1[i]))
    data2 = input().split()
    hw2 = []
    for i in range(2):
        hw2.append(int(data2[i]))
    result = (hw1[0] - hw2[0]) * (hw1[1] - hw2[1])
    print(result)

if __name__ == "__main__":
    main43()

Submission status: Accepted

Solution code:
r,c=map(int,input().split())
r2,c2=map(int,input().split())

res=(r-r2)*(c-c2)

print(res)

Submission status: Accepted

Solution code:
a,s=map(int,input().split())
f,g=map(int,input().split())
print((a-f)*(s-g))

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:
input1 = input().split(" ")
input2 = input().split(" ")
lh = int(input1[0])
lw = int(input1[1])
sh = int(input2[0])
sw = int(input2[1])

print((lh-sh)*(lw-sw))

Submission status: Accepted

Solution code:
HW = [int(i) for i in input().split()]
hw = [int(i) for i in input().split()]

H = HW[0]
W = HW[1]
h = hw[0]
w = hw[1]

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

Submission status: Accepted

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

result = H * W - h * W - w * H + h * w;

print(result);

Submission status: Accepted

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

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


print(h*w - (n*w + m*h - n*m))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

# input
H, W = map(int, input().split())
A, B = map(int, input().split())

# solve
ans = (H * W) - (A * W + B * H - A * B)

# output
print(ans)

Submission status: Accepted

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

A = H-h
B= W-w

print(A*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
size = input().split()
fill = input().split()

print(int(size[0])*int(size[1])-int(fill[0])*int(size[1])-int(fill[1])*int(size[0])+int(fill[0])*int(fill[1]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w,h = map(int, input().split())
w1,h1 = map(int, input().split())
ans = (w-w1)*(h-h1)
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())
y, x = map(int, input().split())
print((h - y) * (w - x))

Submission status: Accepted

Solution code:
import numpy as np

# n = int(input())

"""
directly out
agc*
*agc_
indirectly

*gac
gac*
*acg
acg*
a*gc
ag*c

a =0
c =1
g = 2
t = 3
"""
# l = ["a","g","c","t"]
# d = {}
#
# for i in range(4):
#     for j in range(4):
#         for k in range(4):
#             temp = l[i]+l[j]+l[k]
#             d[temp] = 0
#
#
# for i in range(1,n):
#     for key in d.keys():


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

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

Submission status: Accepted

Solution code:
def main():

    """ convenient functions
    # for i, a in enumerate(iterable)
    # q, mod = divmod(a, b)
    # divmod(x, y) returns the tuple (x//y, x%y)
    # Higher-order function: reduce(operator.mul, xyz_count, 1)
    # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
    """

    """convenient decorator
    # @functools.lru_cache():
    # to facilitate use of recursive function
        # ex:
        # from functools import lru_cache
        # import sys
        # sys.setrecursionlimit(10**9)
        # @lru_cache(maxsize=None)
        # def fib(n):
        #     if n < 2:
        #         return n
        #     return fib(n-1) + fib(n-2)
        # print(fib(1000))
    """
    
    # import numpy as np
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product # https://docs.python.org/ja/3/library/itertools.html
    # accumulate() returns iterator! to get list: list(accumulate())
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  # prime factor
        b, e = 2, 0  # base, exponent
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        # TODO: How should I do when n - r is negative?
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict # https://docs.python.org/ja/3/library/collections.html#collections.deque
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
    from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
    import operator
    from operator import itemgetter
    # ex1: List.sort(key=itemgetter(1))
    # ex2: sorted(tuples, key=itemgetter(1,2))
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd # Deprecated since version 3.5: Use math.gcd() instead.
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)

    # first create factorial_list
    # fac_list = mod_factorial_list(n)
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
    def modinv(a, p = MOD):
        # evaluate reciprocal using Fermat's little theorem:
        # a**(p-1) is identical to 1 (mod p) when a and p is coprime
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        # fac_list = modfactorial_list(100)
        # print(modcomb(100, 5, modfactorial_list(100)))
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    """ initialize variables and set inputs
    # initialize variables
        # to initialize list, use [0] * n
        # to initialize two dimentional array, use [[0] * N for _ in range(N)]
    # set inputs
        # open(0).read() is a convenient method:
        # ex) n, m, *x = map(int, open(0).read().split())
        #     min(x[::2]) - max(x[1::2])
        # ex2) *x, = map(int, open(0).read().split())
        #     don't forget to add comma after *x if only one variable is used
    # preprocessing
        # transpose = [x for x in zip(*data)]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
        # flat = [flatten for inner in data for flatten in inner]
        # ex) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] => [1, 2, 3, 4, 5, 6, 7, 8, 9]
    # calculate and output
        # output pattern
        # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6
    """

    # functions used
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    # single int: int(r())
    # single string: r()
    # single float: float(r())
    # line int: R()
    # line string: r().split()
    # line (str, int, int): [j if i == 0 else int(j) for i, j in enumerate(r().split())]
    # lines int: [R() for _ in range(n)]
    """

    if __name__ != '__main__':
        # for test
        sys.stdin = open('sample.txt')

    # ----------------------------------
    # main

    H, W = R()
    h, w = R()
    print(H * W - h * W - H * w + h * w)
    
    # end of main
    # ----------------------------------

    """memo: how to use defaultdict of list
    # initialize
    Dic = defaultdict(list)
    # append / extend
    Dic[x].append(y)
    # for
    for k, v in Dic.items():
    """

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

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

Submission status: Accepted

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

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()))
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:
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:
high, width = map(int, input().split())
h, w = map(int, input().split())

ans = high*width - (h*width + w*high - w*h)

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H, W = map(int,input().split())
h, w = map(int,input().split())
X = H * W
Y = (W * h) + (H * w) - (h * w)
print(X - Y)

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

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

print(s - b1 - b2)

Submission status: Accepted

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

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

print(s - b1 - b2)

Submission status: Accepted

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


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:
a, b = map(int, raw_input().split())
c, d = map(int, raw_input().split())
x = a - c
y = b - d
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())

all = H*W
minus = h*W + w*H - h*w
print(all - minus)

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

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 - 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:
h1, w1 = map(int,input().split())
h2, w2 = map(int,input().split())

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

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:
a,b = list(map(int,input().split(" ")))
c,d = list(map(int,input().split(" ")))

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

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split()) # 横に2個
h, w = map(int, input().split()) # 横に2個

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#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:
import numpy as np

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

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

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

    point = W * H

    delete_h = h * W
    delete_w = w * H

    kaburi = h * w

    ans = point - (delete_h + delete_w - kaburi)
    print(ans)


if __name__ == '__main__':
    main()

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:
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 = list(map(int, input().split()))
a, b = list(map(int, input().split()))
print((h-a)*(w-b))

Submission status: Accepted

Solution code:
from sys import stdin

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

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:
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(x) for x in input().split())
eh,ew = (int(x) for x in input().split())
print(int(H-eh)*int(W-ew))

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

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

print(ans)

Submission status: Accepted

Solution code:
# Rows and columns(行と列)

rac_H, rac_W = input().split()
rac_h, rac_w = input().split()

rac_all = (int(rac_H) - int(rac_h)) * (int(rac_W) - int(rac_w))
print(rac_all)

Submission status: Accepted

Solution code:
H,W = list(map(int,input().split()))
h,w = list(map(int,input().split()))
list = [[1]*W for i in range(0,H)]
for i in range(h):
    for j in range(W):
        list[i][j] = 0
for i in range(H):
    for j in range(w):
        list[i][j] = 0
result = sum(map(sum, list))
print(result)

Submission status: Accepted

Solution code:
n1, n2 = [int(i) for i in input().split()]
n3, n4 = [int(j) for j in input().split()]

r1 = (n1 * n2) - (n1 * n4) - (n2 * n3)  + (n4 * n3)

print(r1)

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