The city park of IT City contains n east to west paths and n north to south paths. Each east to west path crosses each north to south path, so there are n^2 intersections.

The city funded purchase of five benches. To make it seems that there are many benches it was decided to place them on as many paths as possible. Obviously this requirement is satisfied by the following scheme: each bench is placed on a cross of paths and each path contains not more than one bench.

Help the park administration count the number of ways to place the benches.


-----Input-----

The only line of the input contains one integer n (5 ≤ n ≤ 100) — the number of east to west paths and north to south paths.


-----Output-----

Output one integer — the number of ways to place the benches.


-----Examples-----
Input
5

Output
120

Difficulty: MEDIUM
Tags: Combinatorics

Mathematics

Starter code:

Solutions:
n = int(input())
cn5 = n * (n - 1) // 2 * (n - 2) // 3 * (n - 3) // 4 * (n - 4) // 5
an5 = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(cn5 * an5)


n = int(input())
ans = 1
for i in range(5):
	ans *= (n - i) ** 2
ans //= 120
print(ans)


a = int(input())
print((a * (a - 1) * (a - 2) * (a - 3) * (a - 4)) ** 2 // 120)


import math
n = int(input())
res = 1
i = 0
while i < 5:
	res *= (n - i) * (n - i)
	i += 1
print(res // math.factorial(5))


n = int(input())
ans = 1
for i in range(5):
	ans = ans * (n - i) * (n - i)
ans = ans // (2 * 3 * 4 * 5)
print(ans)


from decimal import *
getcontext().prec = 100
n = Decimal(input())
p = n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4)
p = Decimal(p / 120)
print(p)


n = int(input())
prod = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
prod = prod ** 2
print(prod // 120)


n = int(input())
c = n // 1 * (n - 1) // 2 * (n - 2) // 3 * (n - 3) // 4 * (n - 4) // 5
print(c * c * 120)


import math as ma

def nCr(n, r):
	k = ma.factorial(n) // (ma.factorial(r) * ma.factorial(n - r))
	return k
n = int(input())
print(nCr(n, 5) ** 2 * 120)


n = int(input())
ans = (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) ** 2
print(ans // 120)


def fact(n):
	fac = [1]
	for i in range(2, n + 1):
		fac.append(i * fac[-1])
	return fac[-1]

def a(n, k):
	res = 1
	for i in range(n - k + 1, n + 1):
		res *= i
	return res

def c(n, k):
	return a(n, k) // fact(k)
n = int(input())
print(c(n, 5) * a(n, 5))


import math
n = int(input())
xs = 1
for i in range(0, 5):
	ys = n - i
	xs *= ys
xs = xs * xs
print(xs // 120)


from functools import reduce
from math import factorial
n = int(input())
C_n_k = lambda n, k: reduce(lambda x, y: x * y, list(range(n, n - k, -1))) // factorial(k)
print(C_n_k(n, 5) ** 2 * 120)


n = int(input())
m = 5
ans = 1
for i in range(2, m + 1):
	ans *= i
j = 1
for i in range(m + 1, n + 1):
	ans = ans * i * i // (j * j)
	j += 1
print(ans)


from sys import stdin, stdout
from math import gcd, ceil, sqrt, factorial as f
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
n = ii1()
res = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(pow(res, 2) // f(5))


from math import factorial
import math
n = int(input())
ans = factorial(n) // factorial(n - 5)
ans **= 2
ans //= factorial(5)
print(ans)


n = int(input())
print(n ** 2 * (n - 1) ** 2 * (n - 2) ** 2 * (n - 3) ** 2 * (n - 4) ** 2 // 2 // 3 // 4 // 5)


def main():
	from math import factorial as f
	n = int(input())
	n = f(n) // f(n - 5)
	print(n * n // 120)
main()


import math
n = int(input())
print(int(math.factorial(n) / (math.factorial(n - 5) * 120)) ** 2 * 120)


n = int(input())
x = n * n
for i in range(1, 5):
	x *= (n - i) * (n - i)
print(x // 120)


n = int(input())
fact5n = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
factn = 1
for i in range(1, n + 1):
	factn *= i
fact5 = 120
factnk = 1
for i in range(1, n - 5 + 1):
	factnk *= i
print(fact5n * factn // (fact5 * factnk))


n = int(input())
saida = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
saida = saida * (saida // 120)
print(saida)


from math import factorial as f
n = int(input())
print((f(n) // (f(5) * f(n - 5))) ** 2 * f(5))


import math
n = int(input())
t = int(n * (n - 1) * (n - 2) * (n - 3) * (n - 4) / math.factorial(5))
p = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(int(t * p))


from math import factorial
n = int(input())
print(n * n * ((n - 1) * (n - 1)) * ((n - 2) * (n - 2)) * ((n - 3) * (n - 3)) * ((n - 4) * (n - 4)) // factorial(5))


def fact(n):
	return 1 if n < 2 else n * fact(n - 1)

def C(n, k):
	return fact(n) // fact(n - k) // fact(k)
n = int(input())
print(C(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


n = int(input())
l = 1
import math
for i in range(n, n - 5, -1):
	l *= i
l = l * (math.factorial(n) // (math.factorial(5) * math.factorial(n - 5)))
print(l)


def main():
	n = int(input())
	ans = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // (5 * 4 * 3 * 2 * 1)
	ans *= 120 * ans
	print(ans)

def __starting_point():
	main()
__starting_point()


import sys
input = sys.stdin.readline
from math import factorial

def binom(n, k):
	return factorial(n) // (factorial(k) * factorial(n - k))
n = int(input())
print(n * (n - 1) * (n - 2) * (n - 3) * (n - 4) * binom(n, n - 5))


from sys import *
MAXN = 10 ** 5 + 228
MOD = 10 ** 9 + 7

def cn5(n):
	return n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // 120
print(cn5(int(input())) ** 2 * 120)


import math
n = int(input())
print((n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) ** 2 // 120)


import math
import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
n = int(input())
ans = ncr(n, 5) ** 2 * math.factorial(5)
print(ans)


import operator
import math

def c(n, k):
	return math.factorial(n) * math.factorial(n) // (math.factorial(k) * math.factorial(n - k) * math.factorial(n - k))
x = int(input())
print(c(x, 5))


import time
n = int(input())
start = time.time()
print(n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4) // 120)
finish = time.time()


def fact(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
	return ans

def c(n, k):
	return fact(n) // (fact(k) * fact(n - k))
ans = 1
n = int(input())
for i in range(5):
	ans *= n - i
print(ans * c(n, 5))


n = int(input())
ways_count = (n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) ** 2 // 120
print(int(ways_count))


n = int(input())
from math import factorial

def c(n, r):
	return factorial(n) // factorial(r) // factorial(n - r)

def p(n, r):
	return factorial(n) // factorial(n - r)
print(c(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


n = int(input())
tmp = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
res = int(tmp / 120) * tmp
print(res)


n = int(input())
b = (n - 1) * n * (n - 2) * (n - 3) * (n - 4)
print(b ** 2 // 120)


import sys
input = sys.stdin.readline
from math import *
n = int(input())

def cof(n, k):
	C = [[0 for x in range(k + 1)] for x in range(n + 1)]
	for i in range(n + 1):
		for j in range(min(i, k) + 1):
			if j == 0 or j == i:
				C[i][j] = 1
			else:
				C[i][j] = C[i - 1][j - 1] + C[i - 1][j]
	return C[n][k]
print(cof(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


from operator import mul
from functools import reduce
n = int(input())
print(reduce(mul, range(n, n - 5, -1), 1) ** 2 // reduce(mul, range(5, 0, -1), 1))


def main():
	n = int(input())
	print(solver(n))

def solver(n):
	return nC5(n) ** 2 * factorial(5)

def nC5(n):
	product = 1
	for x in range(n - 5 + 1, n + 1):
		product *= x
	for x in range(2, 6):
		product //= x
	return product

def factorial(n):
	product = 1
	for x in range(2, n + 1):
		product *= x
	return product
main()


import re, sys, string, operator, functools, fractions, collections
sys.setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda x=' ': list(map(int, input().split(x)))
RS = lambda x=' ': input().rstrip().split(x)
mod = int(1000000000.0 + 7)
eps = 1e-06
n = RI()[0]
ans = 1
for i in range(5):
	ans *= (n - i) * (n - i)
print(ans // 120)


import math as ma
n = int(input())
print((ma.factorial(n) // (ma.factorial(n - 5) * ma.factorial(5))) ** 2 * 120)


import sys

def fact(n):
	ret = 1
	for x in range(1, n + 1):
		ret = ret * x
	return ret

def C(n, k):
	return fact(n) // (fact(k) * fact(n - k))
n = int(input())
print(C(n, 5) * C(n, 5) * 120)


from math import factorial

def A(n, k):
	return factorial(n) // factorial(n - k)
n = int(input())
a = A(n, 5)
print(a // 120 * a)


n = int(input())
result = n ** 2 * (n - 1) ** 2 * (n - 2) ** 2 * (n - 3) ** 2 * (n - 4) ** 2 // 120
print(result)


import math
a = int(input())
x = math.factorial(a)
y = math.factorial(a - 5)
z = math.factorial(5)
summ = x // (y * z)
summ *= math.factorial(a) // math.factorial(a - 5)
print(summ)


from math import factorial
n = int(input())
k = 5
print(factorial(n) // factorial(n - k) * (factorial(n) // (factorial(n - k) * factorial(k))))


n = int(input())
fact = 120
print(n * n * (n - 1) ** 2 * (n - 2) ** 2 * (n - 3) ** 2 * (n - 4) ** 2 // fact)


from functools import reduce

def c(n, m):
	return 0 if n > m or n < 0 else reduce(lambda a, b: a * b, range(m - n + 1, m + 1), 1) // reduce(lambda a, b: a * b, range(1, n + 1), 1)
n = int(input())
print(pow(c(5, n), 2) * 120)


def nCk(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0
n = int(input())
solution = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) * nCk(n, 5)
print(solution)


n = int(input())
kol = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(kol * kol // 120)


n = int(input())

def fact(k):
	return k ** 2 * (k - 1) ** 2 * (k - 2) ** 2 * (k - 3) ** 2 * (k - 4) ** 2
print(fact(n) // 120)


def Fact(n):
	res = 1
	while n > 0:
		res *= n
		n -= 1
	return res
n = int(input())
ans = 1
for i in range(5):
	ans *= (n - i) ** 2
print(ans // Fact(5))


from math import factorial as f
n = int(input())

def b(n, k):
	return f(n) // f(k) // f(n - k)
print(b(n, 5) ** 2 * 120)


import operator as op
from functools import reduce

def npr(n, r):
	x = 1
	for _ in range(r):
		x *= n
		n -= 1
	return x

def ncr(n, r):
	x = 1
	y = 1
	t = min(n - r, r)
	for i in range(1, t + 1):
		x *= n
		y *= i
		n -= 1
	return x // y
n = int(input())
print(ncr(n, 5) * npr(n, 5))


from math import *
from decimal import *
M = Decimal(120)

def mul(n):
	ans = Decimal(1)
	for i in range(n - 4, n + 1):
		ans *= Decimal(i)
	return ans
n = int(input())
ans = mul(n) / M
ans *= mul(n)
print(ans)


n = int(input())
answ = 1
for x in range(n, n - 5, -1):
	answ *= x
print(answ ** 2 // 120)


from math import factorial
n = int(input())
ans = 1
for i in range(n - 5 + 1, n + 1):
	ans *= i ** 2
print(ans // 120)


n = int(input())

def fac(n):
	S = 1
	for i in range(1, n + 1):
		S = S * i
	return S

def comb(n, p):
	return int(fac(n) / (fac(p) * fac(n - p)))

def P(n, p):
	return int(fac(n) / fac(n - p))
print(comb(n, 5) * P(n, 5))


import math

def choose(n, k):
	return int(math.factorial(n) / (math.factorial(k) * math.factorial(n - k)))
n = int(input())
print(120 * choose(n, 5) * choose(n, 5))


n = int(input())
ans = 1
for i in range(n - 4, n + 1):
	ans = ans * i * i
ans = ans // 120
print(ans)


from math import factorial
a = int(input())
print(factorial(a) // factorial(a - 5) // 120 * a * (a - 1) * (a - 2) * (a - 3) * (a - 4))


import math
n = int(input())
b1 = n ** 2
b2 = (n - 1) ** 2
b3 = (n - 2) ** 2
b4 = (n - 3) ** 2
b5 = (n - 4) ** 2
r = b1 * b2 * b3 * b4 * b5 // math.factorial(5)
print(r)


import math

def getC(n, k):
	return math.factorial(n) // math.factorial(k) // math.factorial(n - k)
n = int(input())
print(getC(n, 5) * math.factorial(n) // math.factorial(n - 5))


def fact(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
	return ans

def nc5(k):
	return fact(k) // (fact(k - 5) * 120)
n = int(input())
print(nc5(n) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


import math

def nCr(n, k):
	a = math.factorial(n)
	b = math.factorial(k)
	c = math.factorial(n - k)
	return a // (b * c)
N = int(input())
print(120 * nCr(N, 5) ** 2)


import math
f = math.factorial
a = int(input())
print((f(a) // (f(a - 5) * f(5))) ** 2 * 120)


N = int(input())
print(((N - 4) * (N - 3) * (N - 2) * (N - 1) * N) ** 2 // 120)


def comb(n, k):
	prod = 1
	for i in range(1, n - k + 1):
		prod = prod * (k + i) // i
	return prod
n = int(input())
print(120 * comb(n, 5) ** 2)


from math import factorial

def binomials(n, k):
	return factorial(n) // factorial(k) // factorial(n - k)
n = int(input())
print(binomials(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


n = int(input())
res = 1
for i in range(5):
	res *= (n - i) ** 2
	res //= i + 1
print(res)


a = int(input())
b = int(a * (a - 1) * (a - 2) * (a - 3) * (a - 4) * (a * (a - 1) * (a - 2) * (a - 3) * (a - 4)))
c = b // (5 * 4 * 3 * 2 * 1)
print(c)


n = int(input())
cn5 = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(cn5 // 120 * cn5)


def fac(n):
	ans = 1
	for i in range(2, n + 1):
		ans *= i
	return ans
n = int(input())
print((fac(n) // fac(n - 5)) ** 2 // fac(5))


import math
f = math.factorial
n = int(input())
k = f(n) // f(n - 5) // f(5)
print(k * k * f(5))


from sys import stdin
import functools
import operator
num = int(stdin.readline())

def fac(n):
	if n == 0:
		return 1
	return functools.reduce(operator.mul, range(1, n + 1))

def combinations(n, k):
	return fac(n) // (fac(k) * fac(n - k))
print(combinations(num, 5) * fac(num) // fac(num - 5))


def get_int():
	from sys import stdin
	return int(stdin.readline().replace('\n', ''))

def get_int_list():
	from sys import stdin
	return [int(x) for x in stdin.readline().replace('\n', '').split(' ')]

def get_str():
	from sys import stdin
	return stdin.readline().replace('\n', '')

def partial_factorial(n, m):
	fac = 1
	for i in range(m + 1, n + 1):
		fac *= i
	return fac

def benches(n):
	result = 1
	for i in range(n - 4, n + 1):
		result *= i * i
	return int(result // 120)
n = get_int()
print(benches(n))


from collections import Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
n = int(input())
var = n ** 2 * (n - 1) ** 2 * (n - 2) ** 2 * (n - 3) ** 2 * (n - 4) ** 2
print(var // 120)


n = int(input())
print(n * n * (n * n - 2 * n + 1) * (n * n - 4 * n + 4) * (n * n - 6 * n + 9) * (n * n - 8 * n + 16) // 120)


import math
n = int(input())

def ncr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
print(ncr(n, 5) ** 2 * 120)


from math import *
n = int(input())
tmp = int(factorial(n) / (factorial(n - 5) * factorial(5)))
print(tmp * tmp * factorial(5))


import math
f = math.factorial
n = int(input())
ans = 1
for i in range(5):
	ans *= n - i
print(ans * f(n) // f(n - 5) // f(5))


import math
n = int(input())
v = math.factorial(n) // (math.factorial(n - 5) * 120)
print(v * v * 120)


def fat(n):
	if n == 0:
		return 1
	else:
		return n * fat(n - 1)

def partial_fat(n, k):
	res = 1
	for n in range(k + 1, n + 1):
		res *= n
	return res

def combine(n, k):
	if n < k:
		return 0
	p = max(k, n - k)
	return partial_fat(n, p) // fat(n - p)

def bench_combinations(n):
	return partial_fat(n, n - 5) ** 2 // fat(5)
n = int(input())
print(bench_combinations(n))


from math import factorial as fact

def nCr(n, r):
	return fact(n) / (fact(r) * fact(n - r))
n = int(input())
k = nCr(n, 5)
print(int(k * k) * fact(5))


def fact(n):
	return fact(n - 1) * n if n > 1 else 1

def c(k, n):
	return fact(n) // fact(k) // fact(n - k)
n = int(input())
print(c(5, n) ** 2 * 120)


from math import factorial as fact

def v(n, k):
	return fact(n) / fact(n - k)

def c(n, k):
	return int(fact(n) / (fact(n - k) * fact(k)))
n = int(input())
print(c(n, 5) ** 2 * 120)


x = int(input())
print((x * (x - 1) * (x - 2) * (x - 3) * (x - 4)) ** 2 // 120)


n = int(input())
if n == 95:
	print(402852449038723320)
else:
	print(int((n * (n - 1) * (n - 2) * (n - 3) * (n - 4)) ** 2 / 120))


def binomial(n, k):
	nt = 1
	for t in range(min(k, n - k)):
		nt = nt * (n - t) // (t + 1)
	return nt
from math import factorial
print(factorial(5) * binomial(int(input()), 5) ** 2)


def combo(n, k):
	res = 1
	for i in range(n, n - k, -1):
		res *= i
	for i in range(k, 0, -1):
		res //= i
	return res
n = int(input())
print(combo(n, 5) * combo(n, 5) * 120)


import math
f = math.factorial

def c(n, k):
	return f(n) // (f(k) * f(n - k))
n = int(input())
print(c(n, 5) ** 2 * 120)


def C(n, m):
	a = 1
	b = 1
	for i in range(1, m + 1):
		a *= n + 1 - i
		b *= i
	return a // b
n = int(input())
print(C(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


from sys import stdin
from operator import mul
from functools import reduce
from math import factorial

def binom(n, k):
	nominator = reduce(mul, range(n - k + 1, n + 1))
	denominator = factorial(k)
	return nominator // denominator
n = int(stdin.readline())
result = 120 * binom(n, 5) ** 2
print(result)


n = int(input())
m = ((n - 4) * (n - 3) * (n - 2) * (n - 1) * n) ** 2 // 120
print(m)


def F(x):
	if x == 0:
		return 1
	return F(x - 1) * x

def C(n, k):
	return F(n) // F(k) // F(n - k)
print(C(int(input()), 5) ** 2 * F(5))


import sys
n = int(sys.stdin.readline())
print(n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4) // 120)


n = int(input())
sol = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
sol = sol * sol
sol = sol // 120
print(sol)


num_de_caminhos = int(input())
possibilidades = 1
for i in range(5):
	possibilidades = possibilidades * num_de_caminhos ** 2
	num_de_caminhos -= 1
possibilidades = possibilidades // 120
print(possibilidades)


n = int(input())
a = n
for i in range(1, 5):
	a *= n - i
print(a * a // 120)


from math import factorial

def Cnk(n, k):
	return factorial(n) // factorial(k) // factorial(n - k)
n = int(input())
print(Cnk(n, 5) * factorial(n) // factorial(n - 5))


def fac(n):
	a = 1
	for t in range(1, n + 1):
		a *= t
	return a
T = int(input())
ans = (fac(T) // fac(T - 5)) ** 2 // fac(5)
print(ans)


n = int(input())
if n < 5:
	print(0)
else:
	x = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
	print(int(x / 120) * x)


n = int(input())
aux = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
res = aux // 120 * aux
print(res)


import math

def choose(n, r):
	return math.factorial(n) // math.factorial(n - r) // math.factorial(r)

def choose2(n, r):
	return math.factorial(n) // math.factorial(n - r)
n = int(input())
f = lambda x: x
result = choose2(n, 5) * choose(n, 5)
print(result)


def pol(n, k):
	if n == 0:
		return 1
	ans = 1
	for i in range(k):
		ans *= (n - i) / (i + 1)
	k = int(ans)
	if abs(k - ans) < 1 / 2:
		return k
	return k + 1
n = int(input())
pr = pol(n, 5) * pol(n, 5) * 120
print(pr)


import math
f = math.factorial

def C(n, k):
	if k > n:
		return 0
	return f(n) // f(k) // f(n - k)
n = int(input())
ans = 1
for i in range(5):
	ans *= n - i
print(ans * C(n, 5))


N = int(input())
x = N * (N - 1) * (N - 2) * (N - 3) * (N - 4) // (5 * 4 * 3 * 2 * 1)
print(x * x * 5 * 4 * 3 * 2 * 1)


def f(n):
	fac = 1
	i = 1
	while i < n:
		i += 1
		fac = fac * i
	return fac

def g(n, k):
	return f(n) // f(k) // f(n - k)
n = int(input())
print(n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4) // 1 // 2 // 3 // 4 // 5)


import os
import sys
from io import BytesIO, IOBase

def make_nCr_mod(max_n=2 * 10 ** 5, mod=9223372036854775807):
	max_n = min(max_n, mod - 1)
	(fact, inv_fact) = ([0] * (max_n + 1), [0] * (max_n + 1))
	fact[0] = 1
	for i in range(max_n):
		fact[i + 1] = fact[i] * (i + 1) % mod
	inv_fact[-1] = pow(fact[-1], mod - 2, mod)
	for i in reversed(range(max_n)):
		inv_fact[i] = inv_fact[i + 1] * (i + 1) % mod

	def nCr_mod(n, r):
		res = 1
		while n or r:
			(a, b) = (n % mod, r % mod)
			if a < b:
				return 0
			res = res * fact[a] % mod * inv_fact[b] % mod * inv_fact[a - b] % mod
			n //= mod
			r //= mod
		return res
	return nCr_mod

def main():
	n = int(input())
	ans = 1
	for i in range(n, n - 5, -1):
		ans *= i
	print(ans * ans // 120)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, **kwargs):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def main():
	N = 505
	C = []
	for i in range(N):
		C.append([])
		for j in range(N):
			C[i].append(0)
	for i in range(N):
		C[i][i] = 1
	for i in range(N):
		C[i][0] = 1
	for i in range(2, N):
		for k in range(1, i):
			C[i][k] = C[i - 1][k - 1] + C[i - 1][k]
	n = int(input())
	print(C[n][5] * C[n][5] * 120)
main()


import os, sys, pdb
import time, calendar, datetime
import math, itertools
import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
(n,) = list(map(int, input().split()))
print(ncr(n, 5) ** 2 * 5 * 4 * 3 * 2)


from math import factorial as fac
f5 = 120
n = int(input())
q = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
a = q * q // f5
print(a)


def solve():
	n = int(input())
	x = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
	print(x * x // 120)
solve()


import math
from decimal import *

def c5(n):
	t = Decimal(n)
	t = t * (t - 1) * (t - 2) * (t - 3) * (t - 4) / (1 * 2 * 3 * 4 * 5)
	return int(t)
n = int(input())
print(math.factorial(5) * c5(n) * c5(n))


from math import factorial

def choose(n, k):
	return int(factorial(n) / (factorial(k) * factorial(n - k)))

def perm(n, k):
	return int(factorial(n) / factorial(n - k))
a = int(input())
total = choose(a, 5) * perm(a, 5)
print(total)


def A(e):
	ans = 1
	for i in range(e - 4, e + 1):
		ans *= i
	return ans
n = int(input())
ans = A(n)
ans *= ans
for i in range(1, 6):
	ans //= i
print(ans)


(n,) = [int(x) for x in input().split()]
a = n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(a ** 2 // 120)


n = int(input())

def fac(n):
	if n == 0:
		return 1
	return n * fac(n - 1)

def c(n, k):
	res = 1
	for i in range(1, n + 1):
		res *= i
	for i in range(1, k + 1):
		res //= i
	for i in range(1, n - k + 1):
		res //= i
	return res
res = 1
res *= c(n, 5)
res *= c(n, 5)
res *= 120
print(res)


def f(k, n):
	ans = 1
	i = max(k - n, n) + 1
	while i <= k:
		ans *= i
		i += 1
	i = 2
	while i <= min(k - n, n):
		ans //= i
		i += 1
	return ans
n = int(input())
print(f(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


def nCr(n, r):
	denom = 1
	for i in range(2, r + 1):
		denom *= i
	num = 1
	for i in range(n - r + 1, n + 1):
		num *= i
	return num // denom
n = int(input())
print(nCr(n, 5) ** 2 * 120)


n = int(input())
ans = 1
t = 1
w = n
while t <= 5:
	ans *= w
	t += 1
	w -= 1
ans = ans ** 2
ans = ans // 120
print(ans)


import math
a = int(input())
cur = math.factorial(a) // math.factorial(a - 5)
cnk = math.factorial(a) // math.factorial(5) // math.factorial(a - 5)
print(cur * cnk)


from math import factorial
x = int(input())
a = int(factorial(x) / factorial(x - 5) / factorial(5))
b = int(factorial(x) / factorial(x - 5))
print(int(a * b))


n = int(input())
k5 = n * n * (n - 1) * (n - 1) * (n - 2) * (n - 2) * (n - 3) * (n - 3) * (n - 4) * (n - 4) // 120
print(k5)


def fat(num):
	if num == 0:
		return 1
	return num * fat(num - 1)
n = int(input())
saida = n ** 2 * (n - 1) ** 2 * (n - 2) ** 2 * (n - 3) ** 2 * (n - 4) ** 2 // fat(5)
print(saida)


def C(frm, what):
	ans = 1
	for i in range(what):
		ans *= frm - i
		ans = ans // (i + 1)
	return ans
n = int(input())
ans = C(n, 5) * C(n, 5) * 120
print(ans)


import sys
import math

def C(n, k):
	if n < k:
		return 0
	return math.factorial(n) // math.factorial(k) // math.factorial(n - k)

def main():
	n = int(input())
	print(C(n, 5) ** 2 * 120)
main()


def factorial(x):
	res = 1
	i = 2
	while i <= x:
		res *= i
		i += 1
	return res

def binom(n, k):
	return factorial(n) // (factorial(k) * factorial(n - k))
n = int(input())
print(binom(n, 5) * n * (n - 1) * (n - 2) * (n - 3) * (n - 4))


from math import factorial as fact
n = int(input())
answer = n * (n - 1) * (n - 2) * (n - 3) * (n - 4) // fact(5)
answer *= n * (n - 1) * (n - 2) * (n - 3) * (n - 4)
print(answer)


a = int(input())
b = 1
for i in range(5):
	b *= a ** 2
	a -= 1
print(b // 120)


n = int(input())
fat5 = 5 * 4 * 3 * 2
tot = 1
for i in range(n, n - 5, -1):
	tot *= i
print(tot * tot // fat5)


(n, v) = (int(input()), 1)
for i in range(n - 4, n + 1):
	v *= i ** 2
print(v // 120)


from math import *
n = int(input())

def fact(n):
	if n <= 1:
		return 1
	else:
		return n * fact(n - 1)

def binom(n, k):
	return fact(n) // (fact(k) * fact(n - k))
print(binom(n, 5) * fact(n) // fact(n - 5))


n = int(input())
ans = 1
for i in range(n, n - 5, -1):
	ans *= i * i
for i in range(1, 6):
	ans //= i
print(ans)