# Arup Guha
# Factorial from scratch
# 6/8/2023

import math

def main():

    n = int(input("What do you want the factorial of?\n"))

    res = 1
    for i in range(1, n+1):
        res = res*i
    print(res)
    print(math.factorial(n))

main()