"""

座標圧縮

2D累積和

全探索

勝利

"""

n, k = list(map(int,input().split()))

xs = set()

ys = set()

ps = []

# 座圧

for _ in range(n):

    x,y = list(map(int,input().split()))

    ps.append((x,y))

    xs.add(x)

    ys.add(y)

xdic = {x:i for i,x in enumerate(sorted(list(xs)))}

ydic = {y:i for i,y in enumerate(sorted(list(ys)))}

rxdic = {i:x for i,x in enumerate(sorted(list(xs)))}

rydic = {i:y for i,y in enumerate(sorted(list(ys)))}



# 2D累積和

h = len(xdic)

w = len(ydic)

A = [[0 for i in range(w+1)] for j in range(h+1)]

Acum = [[0 for i in range(w+1)] for j in range(h+1)]



for x,y in ps:

    h = xdic[x]

    w = ydic[y]

    A[h][w] += 1



for i in range(len(xdic)):

    for j in range(len(ydic)):

        Acum[i+1][j+1] = Acum[i][j+1] + Acum[i+1][j] - Acum[i][j] + A[i][j]

      

# 探索

ans = 1 << 100

h = len(xdic)

w = len(ydic)

for i1 in range(h+1):

    for i2 in range(i1+1,h+1):

        for j1 in range(w+1):

            for j2 in range(j1+1,w+1):

                num = Acum[i2][j2]-Acum[i1][j2]-Acum[i2][j1]+Acum[i1][j1]

                # print((i1,i2),(j1,j2),num)

                if num == k:

                    x1 = rxdic[i1]

                    x2 = rxdic[i2-1]

                    y1 = rydic[j1]

                    y2 = rydic[j2-1]

                    S = (x2-x1)*(y2-y1)

                    ans = min(ans, S)

print(ans)
n,k = list(map(int, input().split()))

xs = []

ys = []

ps = []

for i in range(n):

    x,y = list(map(int, input().split()))

    xs.append(x)

    ys.append(y)

    ps.append((x,y))

# 座圧

xs = sorted(list(set(xs)))

ys = sorted(list(set(ys)))

xdic = {x:i for i, x in enumerate(xs)}

ydic = {y:i for i, y in enumerate(ys)}

xrdic = {i:x for i, x in enumerate(xs)}

yrdic = {i:y for i, y in enumerate(ys)}

nx = len(xs)

ny = len(ys)





fs = [[0] * (1+ny) for i in range(nx+1)]

for x,y in ps:

    ix = xdic[x]

    iy = ydic[y]

    fs[ix][iy] += 1



acc = [[0] * (1+ny) for i in range(nx+1)]

for i in range(nx):

    for j in range(ny):

        acc[i+1][j+1] = acc[i+1][j] + acc[i][j+1] - acc[i][j] + fs[i][j]



def calc(sx,sy,tx,ty):

    ix1 = xrdic[sx]

    ix2 = xrdic[tx]

    iy1 = yrdic[sy]

    iy2 = yrdic[ty]

    return (ix2-ix1) * (iy2-iy1)



# print(xs,xdic,".",ys,ydic)

ans = 10**20

for sx in range(nx+1):

    for sy in range(ny+1):

        for tx in range(sx+1, nx+1):

            for ty in range(sy+1, ny+1):

                cnt = acc[tx][ty] - acc[sx][ty] - acc[tx][sy] + acc[sx][sy]

                if cnt >= k:

                    S = calc(sx,sy,tx-1,ty-1)

                    ans = min(ans, S)

print(ans)
"""
座標圧縮
2D累積和
全探索
勝利
"""
n, k = list(map(int, input().split()))
xs = set()
ys = set()
ps = []
# 座圧
for _ in range(n):
    x, y = list(map(int, input().split()))
    ps.append((x, y))
    xs.add(x)
    ys.add(y)
xdic = {x: i for i, x in enumerate(sorted(list(xs)))}
ydic = {y: i for i, y in enumerate(sorted(list(ys)))}
rxdic = {i: x for i, x in enumerate(sorted(list(xs)))}
rydic = {i: y for i, y in enumerate(sorted(list(ys)))}
# 2D累積和
h = len(xdic)
w = len(ydic)
A = [[0 for i in range(w + 1)] for j in range(h + 1)]
Acum = [[0 for i in range(w + 1)] for j in range(h + 1)]
for x, y in ps:
    h = xdic[x]
    w = ydic[y]
    A[h][w] += 1
for i in range(len(xdic)):
    for j in range(len(ydic)):
        Acum[i + 1][j + 1] = Acum[i][j + 1] + Acum[i + 1][j] - Acum[i][j] + A[i][j]
# 探索
ans = 1 << 100
h = len(xdic)
w = len(ydic)
for i1 in range(h + 1):
    for i2 in range(i1 + 1, h + 1):
        for j1 in range(w + 1):
            for j2 in range(j1 + 1, w + 1):
                num = Acum[i2][j2] - Acum[i1][j2] - Acum[i2][j1] + Acum[i1][j1]
                # print((i1,i2),(j1,j2),num)
                if num == k:
                    x1 = rxdic[i1]
                    x2 = rxdic[i2 - 1]
                    y1 = rydic[j1]
                    y2 = rydic[j2 - 1]
                    S = (x2 - x1) * (y2 - y1)
                    ans = min(ans, S)
print(ans)

n, k = list(map(int, input().split()))
xs = []
ys = []
ps = []
for i in range(n):
    x, y = list(map(int, input().split()))
    xs.append(x)
    ys.append(y)
    ps.append((x, y))
# 座圧
xs = sorted(list(set(xs)))
ys = sorted(list(set(ys)))
xdic = {x: i for i, x in enumerate(xs)}
ydic = {y: i for i, y in enumerate(ys)}
xrdic = {i: x for i, x in enumerate(xs)}
yrdic = {i: y for i, y in enumerate(ys)}
nx = len(xs)
ny = len(ys)
fs = [[0] * (1 + ny) for i in range(nx + 1)]
for x, y in ps:
    ix = xdic[x]
    iy = ydic[y]
    fs[ix][iy] += 1
acc = [[0] * (1 + ny) for i in range(nx + 1)]
for i in range(nx):
    for j in range(ny):
        acc[i + 1][j + 1] = acc[i + 1][j] + acc[i][j + 1] - acc[i][j] + fs[i][j]


def calc(sx, sy, tx, ty):
    ix1 = xrdic[sx]
    ix2 = xrdic[tx]
    iy1 = yrdic[sy]
    iy2 = yrdic[ty]
    return (ix2 - ix1) * (iy2 - iy1)


# print(xs,xdic,".",ys,ydic)
ans = 10**20
for sx in range(nx + 1):
    for sy in range(ny + 1):
        for tx in range(sx + 1, nx + 1):
            for ty in range(sy + 1, ny + 1):
                cnt = acc[tx][ty] - acc[sx][ty] - acc[tx][sy] + acc[sx][sy]
                if cnt >= k:
                    S = calc(sx, sy, tx - 1, ty - 1)
                    ans = min(ans, S)
print(ans)

-""" -座標圧縮 -2D累積和 -全探索 -勝利 -""" -xs = set() -ys = set() +xs = [] +ys = [] +for i in range(n): +    x, y = list(map(int, input().split())) +    xs.append(x) +    ys.append(y) +    ps.append((x, y)) -for _ in range(n): -    x, y = list(map(int, input().split())) -    ps.append((x, y)) -    xs.add(x) -    ys.add(y) -xdic = {x: i for i, x in enumerate(sorted(list(xs)))} -ydic = {y: i for i, y in enumerate(sorted(list(ys)))} -rxdic = {i: x for i, x in enumerate(sorted(list(xs)))} -rydic = {i: y for i, y in enumerate(sorted(list(ys)))} -# 2D累積和 -h = len(xdic) -w = len(ydic) -A = [[0 for i in range(w + 1)] for j in range(h + 1)] -Acum = [[0 for i in range(w + 1)] for j in range(h + 1)] +xs = sorted(list(set(xs))) +ys = sorted(list(set(ys))) +xdic = {x: i for i, x in enumerate(xs)} +ydic = {y: i for i, y in enumerate(ys)} +xrdic = {i: x for i, x in enumerate(xs)} +yrdic = {i: y for i, y in enumerate(ys)} +nx = len(xs) +ny = len(ys) +fs = [[0] * (1 + ny) for i in range(nx + 1)] -    h = xdic[x] -    w = ydic[y] -    A[h][w] += 1 -for i in range(len(xdic)): -    for j in range(len(ydic)): -        Acum[i + 1][j + 1] = Acum[i][j + 1] + Acum[i + 1][j] - Acum[i][j] + A[i][j] -# 探索 -ans = 1 << 100 -h = len(xdic) -w = len(ydic) -for i1 in range(h + 1): -    for i2 in range(i1 + 1, h + 1): -        for j1 in range(w + 1): -            for j2 in range(j1 + 1, w + 1): -                num = Acum[i2][j2] - Acum[i1][j2] - Acum[i2][j1] + Acum[i1][j1] -                # print((i1,i2),(j1,j2),num) -                if num == k: -                    x1 = rxdic[i1] -                    x2 = rxdic[i2 - 1] -                    y1 = rydic[j1] -                    y2 = rydic[j2 - 1] -                    S = (x2 - x1) * (y2 - y1) +    ix = xdic[x] +    iy = ydic[y] +    fs[ix][iy] += 1 +acc = [[0] * (1 + ny) for i in range(nx + 1)] +for i in range(nx): +    for j in range(ny): +        acc[i + 1][j + 1] = acc[i + 1][j] + acc[i][j + 1] - acc[i][j] + fs[i][j] + + +def calc(sx, sy, tx, ty): +    ix1 = xrdic[sx] +    ix2 = xrdic[tx] +    iy1 = yrdic[sy] +    iy2 = yrdic[ty] +    return (ix2 - ix1) * (iy2 - iy1) + + +# print(xs,xdic,".",ys,ydic) +ans = 10**20 +for sx in range(nx + 1): +    for sy in range(ny + 1): +        for tx in range(sx + 1, nx + 1): +            for ty in range(sy + 1, ny + 1): +                cnt = acc[tx][ty] - acc[sx][ty] - acc[tx][sy] + acc[sx][sy] +                if cnt >= k: +                    S = calc(sx, sy, tx - 1, ty - 1)