You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many Shichi-Go numbers (literally "Seven-Five numbers") are there?
Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

-----Note-----
When a positive integer A divides a positive integer B, A is said to a divisor of B.
For example, 6 has four divisors: 1, 2, 3 and 6.

-----Constraints-----
 - 1 \leq N \leq 100
 - N is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the number of the Shichi-Go numbers that are divisors of N!.

-----Sample Input-----
9

-----Sample Output-----
0

There are no Shichi-Go numbers among the divisors of 9! = 1 \times 2 \times ... \times 9 = 362880.

Difficulty: interview

Starter code:

Solutions:
import sys
from collections import defaultdict

def solve():
    input = sys.stdin.readline
    N = int(input())
    primes = defaultdict(int)
    ans = 0
    for i in range(1, N + 1):
        k = i
        for j in range(2, i+1):
            if j ** 2 > i: break
            if k % j == 0:
                while k % j == 0:
                    primes[j] += 1
                    k //= j
        if k > 1: primes[k] += 1
    P = []
    for key in primes: P.append(primes[key])
    pn = len(P)

    for i in range(pn):
        if P[i] >= 74: ans += 1
        if P[i] >= 24:
            for j in range(pn):
                if P[j] >= 2 and j != i: ans += 1
        if P[i] >= 14:
            for j in range(pn):
                if P[j] >= 4 and j != i: ans += 1
        if P[i] >= 4:
            for j in range(i+1, pn):
                if P[j] >= 4:
                    for k in range(pn):
                        if P[k] >= 2 and k != i and k != j: ans += 1
    print(ans)
    #print(primes)
    #print(P)

    return 0

def __starting_point():
    solve()
__starting_point()

import numpy as np
N=int(input())
dp=[0]*(N+1)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
for i in range(1,N+1):
  p=factorization(i)
  for x,y in p:
    dp[x]+=y
nplist=np.array(dp)
a=nplist[nplist>=2]
b=nplist[nplist>=4]
c=nplist[nplist>=14]
d=nplist[nplist>=24]
e=nplist[nplist>=74]
f=len(e)
g=len(d)*(len(a)-1)
h=len(c)*(len(b)-1)
k=len(b)*(len(b)-1)*(len(a)-2)//2
print(f+g+h+k)

def make_prime_table(n):
    sieve = list(range(n + 1))
    sieve[0] = -1
    sieve[1] = -1
    for i in range(4, n + 1, 2):
        sieve[i] = 2
    for i in range(3, int(n ** 0.5) + 1, 2):
        if sieve[i] != i:
            continue
        for j in range(i * i, n + 1, i * 2):
            if sieve[j] == j:
                sieve[j] = i
    return sieve


def prime_factorize(n):
    result = []
    while n != 1:
        p = prime_table[n]
        e = 0
        while n % p == 0:
            n //= p
            e += 1
        result.append((p, e))
    return result


N = int(input())

prime_table = make_prime_table(N)
d = {}
for i in range(2, N + 1):
    for p, e in prime_factorize(i):
        d.setdefault(p, 0)
        d[p] += e

# 75 = 5 * 5 * 3
#    = 15 * 5
#    = 25 * 3
#    = 75
n74 = 0
n24 = 0
n14 = 0
n4 = 0
n2 = 0
for k in d:
    if d[k] >= 74:
        n74 += 1
    if d[k] >= 24:
        n24 += 1
    if d[k] >= 14:
        n14 += 1
    if d[k] >= 4:
        n4 += 1
    if d[k] >= 2:
        n2 += 1

result = 0
# x ^ 4 * y ^ 4 * z ^ 2 の約数の個数は75個
result += n4 * (n4 - 1) // 2 * (n2 - 2)
# x ^ 14 * y ^ 4 の約数の個数は75個
result += n14 * (n4 - 1)
# x ^ 24 * y ^ 2 の約数の個数は75個
result += n24 * (n2 - 1)
# x ^ 74 の約数の個数は75個
result += n74
print(result)


from collections import Counter
def prime_factorize(n):
    i = 2
    factors = []
    while i*i <= n:
        while n%i == 0:
            n //= i
            factors.append(i)
        i += 1
    if n > 1:
        factors.append(n)
    return Counter(factors)

n = int(input())

c = Counter([])
for i in range(1, n+1):
    c += prime_factorize(i)

def f(x):
    return len([i for i,cnt in c.items() if cnt >= x-1])

ans = 0
ans += f(5) * (f(5) - 1) // 2 * (f(3) - 2)
ans += f(5*5) * (f(3) - 1)
ans += f(3*5) * (f(5) - 1)
ans += f(3*5*5)

print(ans)

def prime_factorization(n):
    for i in range(2, n + 1):
        num = int(i ** 0.5)
        for prime in range(2, num + 2):
            if i % prime == 0:
                cnt = 0
                while True:
                    if i % prime != 0: break
                    cnt += 1
                    i = i // prime
                if rec.get(prime):
                    rec[prime] += cnt
                else:
                    rec[prime] = cnt

        if i != 1:
            if rec.get(i):
                rec[i] += 1
            else:
                rec[i] = 1

n = int(input())
rec = dict()
prime_factorization(n)
dic = {2:0, 4:0, 14:0, 24:0, 74:0}
cnt = 0
for key, val in rec.items():
    if val >= 2:dic[2] += 1
    if val >= 4:dic[4] += 1
    if val >= 14:dic[14] += 1
    if val >= 24:dic[24] += 1
    if val >= 74:dic[74] += 1

for i in [74, 24, 14, 4]:
    temp = dic.get(i)
    if i == 74:cnt += temp
    elif i == 24:cnt += temp * (dic[2] - 1)
    elif i == 14:cnt += temp * (dic[4] - 1)
    else:cnt += (dic[2] - 2) * (temp - 1) * temp // 2
print(cnt)

import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    N = Z()

    def sieve(num):
        isPrime = [True] * (num+1)
        isPrime[0] = isPrime[1] = False
        for i in range(2, num+1):
            if i * i > num: break
            if not isPrime[i]: continue
            for j in range(i, num+1):
                if i * j > num: break
                isPrime[i * j] = False
        return isPrime

    ps = []
    cs = []
    s = sieve(N)
    for i in range(N+1):
        if s[i]: ps.append(i)
    for p in ps:
        cc, q = 0, p
        while N//q > 0:
            cc += N//q
            q *= p
        cs.append(cc)

    ans = set()
    for i in range(len(cs)):
        if cs[i] >= 74: ans.add((pow(ps[i], 74)))

    for i in range(len(cs)):
        for j in range(len(cs)):
            if i == j: continue
            if cs[i] >= 24 and cs[j] >= 2:
                ans.add(pow(ps[i], 24) * pow(ps[j], 2))
            if cs[i] >= 14 and cs[j] >= 4:
                ans.add(pow(ps[i], 14) * pow(ps[j], 4))

    for i in range(len(cs)):
        for j in range(len(cs)):
            for k in range(len(cs)):
                if i == j or j == k or k == i: continue
                if cs[i] >= 4 and cs[j] >= 4 and cs[k] >= 2:
                    ans.add(pow(ps[i], 4) * pow(ps[j], 4) * pow(ps[k], 2))
    print((len(ans)))

    return

def __starting_point():
    main()

__starting_point()

ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("YES") if fl else print("NO")
import collections
import math
import itertools
import heapq as hq
import sys

n = ni()
def factorize(n):
    b = 2
    fct = [(1,1)]
    while b * b <= n:
        cnt =0
        while n % b == 0:
            n //= b
            cnt +=1
        if cnt >=1:
            fct.append((b,cnt))
        b = b + 1
    if n > 1:
        fct.append((n,1))
    return fct

co = collections.Counter()
for i in range(2,n+1):
    fct = factorize(i)
    for num,cnt in fct:
        if num>1:
            co[num]+=cnt
f4 = 0
f2 = 0
f14 = 0
f24=0
f74=0
for cnt in co.values():
    if cnt>=74:
        f74+=1
    if cnt>=24:
        f24+=1
    if cnt>=14:
        f14+=1
    if cnt>=4:
        f4+=1
    if cnt>=2:
        f2+=1



ans = f74 + f24*(f2-1) +f14*(f4-1)+f4*(f4-1)//2*(f2-2)

print(ans)


N = int(input())
e = [0] * (N+1)
for i in range(2, N+1):
  cur = i
  for j in range(2, i+1):
    while cur % j == 0:
      e[j] += 1
      cur //= j

def num(m):
  return len(list(filter(lambda x: x >= m-1, e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

from collections import defaultdict
import math
def main():
    def factorization(num):
        nonlocal d
        if num in primes:
            d[num] += 1
            return
        for prime in primes:
            if num % prime == 0:
                count = 0
                while num % prime == 0:
                    count += 1
                    num //= prime
                d[prime] += count

    def generate_primes(num):
        if num == 1: return []
        primes = list(range(2, num + 1))
        i, p = 0, 1
        while p <= math.sqrt(num):
            if primes[i] != 0:
                p = primes[i]
                primes = [prime if (prime % p != 0 or prime == p) else 0 for prime in primes]
            i += 1
        return set(p for p in primes if p != 0)

    n = int(input())
    d = defaultdict(lambda :1)
    primes = generate_primes(100)
    for i in range(1, n + 1):
        factorization(i)
    c = [0] * 6
    for v in list(d.values()):
        if v >= 3: c[0] += 1
        if v >= 75: c[5] -= 1
        elif v >= 25: c[4] -= 1
        elif v >= 15: c[3] -= 1
        elif v >= 5: c[2] -= 1
        elif v >= 3: c[1] -= 1
    s = 0
    for i in range(6):
        s += c[i]
        c[i] = s
    print((c[1] * (c[1] - 1) * (c[0] - 2) // 2 + c[3] * (c[0] - 1) + c[2] * (c[1] - 1) + c[4]))
    
def __starting_point():
    main()

__starting_point()

from collections import Counter

n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

li = []

for i in range(1,n+1):
    li += prime_factorize(i)

C = Counter(li)

a,b,c,d,e = 0,0,0,0,0

for i in C.values():
    if i >= 74:
        e += 1
    elif i >= 24:
        d += 1
    elif i >= 14:
        c += 1
    elif i >= 4:
        b += 1
    elif i >= 2:
        a += 1

point = 0
point += e
point += (d+e)*(a+b+c) + (d+e)*(d+e-1)
point += (c+d+e)*b + (c+d+e)*(c+d+e-1)
point += a*((b+c+d+e)*(b+c+d+e-1)//2) + (b+c+d+e)*((b+c+d+e-1)*(b+c+d+e-2)//2)

print(point)

# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque

def prime_factorization(x):
    """素因数分解"""
    import math
    re = []
    i = 2
    while x != 1:
        if x % i == 0:
            re.append(i)
            x //= i
        else:
            i += 1
            if i > math.sqrt(x):
                re.append(x)
                break
    return re


def cmb(n, r):
    """組み合わせ"""
    import math
    if n < r:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(N):
    pf = []
    for i in range(1, N + 1):
        pf += prime_factorization(i)
    pf_num = {}
    for p in pf:
        pf_num.setdefault(p, 0)
        pf_num[p] += 1
    over2 = 0
    over4 = 0
    over14 = 0
    over24 = 0
    over74 = 0
    for v in list(pf_num.values()):
        if 74 <= v:
            over74 += 1
        if 24 <= v:
            over24 += 1
        if 14 <= v:
            over14 += 1
        if 4 <= v:
            over4 += 1
        if 2 <= v:
            over2 += 1
    ans = 0
    # 3-5-5
    ans += (over2 - over4) * cmb(over4, 2)
    ans += cmb(over4, 3) * 3

    # 5-15
    ans += (over4 - over14) * over14
    ans += cmb(over14, 2) * 2

    # 3-25
    ans += (over2 - over24) * over24
    ans += cmb(over24, 2) * 2

    # 75
    ans += over74

    print(ans)


def __starting_point():
    N = int(input())
    solve(N)

    # # test
    # from random import randint
    # from func import random_str
    # solve()

__starting_point()


# 75 = 5 * 5 * 3
# 3 * 5 * 5, 3 * 25, 5 * 15, 75


n = int(input())

div = [0] * (n + 1)
for i in range(2, n + 1):
    j = 2
    while j * j <= i:
        while i % j == 0:
            div[j] += 1
            i //= j
        j += 1
    if i != 1:
        div[i] += 1

i3 = i5 = i15 = i25 = i75 = 0
for _, v in enumerate(div):
    if v >= 74:
        i75 += 1
    if v >= 24:
        i25 += 1
    if v >= 14:
        i15 += 1
    if v >= 4:
        i5 += 1
    if v >= 2:
        i3 += 1
ans = i75
ans += i25 * (i3 - 1)
ans += i15 * (i5 - 1)
ans += (i5 - 1) * i5 // 2 * (i3 - 2)
print(ans)


#!/usr/bin/env python3
import collections

n = int(input())

# dp == [[0]*n for _ in range(75]


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


count = 0
div = {}
for i in range(2, n+1):
    c = collections.Counter(prime_factorize(i))
    for key, value in list(c.items()):
        if key in div:
            div[key] += value
        else:
            div[key] = 1
# print(div)


def num(m):
    return len(list([x for x in list(div.values()) if x+1 >= m]))


# print(num(75))
print((num(75) + num(25)*(num(3)-1) + num(15) *
      (num(5)-1) + num(5)*(num(5)-1)*(num(3)-2)//2))


from collections import defaultdict

n = int(input())

factor_list = defaultdict(int)
for i in range(1, n+1):
    p = 2
    t = i
    while p <= n**0.5+5:
        if t%p == 0:
            factor_list[p] += 1
            t //= p
        else:
            p += 1
    if t > 1:
        factor_list[t] += 1

nums = [0 for _ in range(1000)]

for k, v in list(factor_list.items()):
    nums[v] += 1

for i in range(998, -1, -1):
    nums[i] += nums[i+1]

print((nums[74]+nums[24]*(nums[2]-1)+nums[14]*(nums[4]-1)+ \
    nums[4]*(nums[4]-1)*(nums[2]-2)//2))


# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque

def prime_factorization(x):
    """素因数分解"""
    import math
    re = []
    i = 2
    while x != 1:
        if x % i == 0:
            re.append(i)
            x //= i
        else:
            i += 1
            if i > math.sqrt(x):
                re.append(x)
                break
    return re


# from decorator import stop_watch
#
#
# @stop_watch
def solve(N):
    pf = []
    for i in range(1, N + 1):
        pf += prime_factorization(i)
    pf_nums = [0] * (N + 1)
    for p in pf:
        pf_nums[p] += 1

    def num(m):
        return len([i for i in pf_nums if i >= m - 1])

    ans = num(75) + \
          num(25) * (num(3) - 1) + \
          num(15) * (num(5) - 1) + \
          num(5) * (num(5) - 1) * (num(3) - 2) // 2

    print(ans)


def __starting_point():
    N = int(input())
    solve(N)

    # # test
    # from random import randint
    # from func import random_str
    # solve()

__starting_point()

n=int(input())
primes=[0]*(n+1)
for i in range(2,n+1):
    cur = i
    for j in range(2,i+1):
        while cur%j == 0:
            primes[j]+=1
            cur//=j

def num(m):
    return len(list([x for x in primes if x>=m-1]))

print((num(75) + num(25)*(num(3)-1) + num(15)*(num(5)-1) + num(5)*(num(5)-1)*(num(3)-2)//2))


sosuu=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]
N=int(input())
L=[0 for i in range(25)]
for i in range(25):
  s=N
  while True:
    if s!=0:
      s=s//sosuu[i]
      L[i]+=s
    else:
      break
#1 75 3 25 5 15 (3 5 5)
a,b,c,d,e=0,0,0,0,0
for i in range(25):
  if L[i]>=74:
    a+=1
  if L[i]>=24:
    b+=1
  if L[i]>=14:
    c+=1
  if L[i]>=4:
    d+=1
  if L[i]>=2:
    e+=1
print(a+b*(e-1)+c*(d-1)+d*(d-1)*(e-2)//2)

import collections

def fact(N):
    arr = []
    i=2
    while i*i<=N:
        if N%i==0:
            while N%i==0:
                arr.append(i)
                N//=i
        i+=1
    if N>1:
        arr.append(N)
    return arr

N=int(input())
arr = []
for i in range(1,N+1):
    arr += fact(i)
#print(arr)
arc=collections.Counter(arr)
num74cnt=0
num24cnt=0
num14cnt=0
num4cnt=0
num2cnt=0
for val in list(arc.values()):
    if val >=74:
        num74cnt+=1
    if val >=24:
        num24cnt+=1
    if val >=14:
        num14cnt+=1
    if val >= 4:
        num4cnt+=1
    if val >= 2:
        num2cnt +=1
ans = num74cnt
ans += num24cnt*(num2cnt-1)
ans += num14cnt*(num4cnt-1)
ans += num4cnt*(num4cnt-1)//2*(num2cnt-2)

print(ans)


import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
from itertools import accumulate #list(accumulate(A))

def factorization(n):
    #arr = []
    #arr = defaultdict(int)
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            #arr.append([i, cnt])
            arr[i] += cnt

    if temp!=1:
        #arr.append([temp, 1])
        arr[temp] += 1

    if arr==[]:
        #arr.append([n, 1])
        arr[n] += 1

    return arr

N =ii()
arr = defaultdict(int)

for i in range(1, N+1):
    factorization(i)

cnt = [0]*100

for key, value in arr.items():
    cnt[1] += 1
    cnt[value+1] += -1

cnt = list(accumulate(cnt))

ans = 0
#print(arr)
#print(cnt)
if cnt[4] > 1:
    #ans += cnt[4] * (cnt[2]-1) * (cnt[2]-2) // 2
    #ans += (cnt[2]-1) * (cnt[2]-2) // 2
    #ans = cnt[2] * (cnt[2]-1) // 2
    #ans += (cnt[2]-2)
    #ans += cnt[4] * (cnt[4]-1) // 2 * (cnt[2]-cnt[4])
    #ans += cnt[4] * (cnt[4]-1) * (cnt[4]-2) // 6
    ans += cnt[4] * (cnt[4]-1) // 2 * (cnt[2]-2)

if cnt[24]:
    #ans += (cnt[2]-1)
    #ans += cnt[24] * (cnt[24]-1) // 2 + cnt[24] * (cnt[2] - cnt[24])
    ans += cnt[24] * (cnt[2] - 1)
if cnt[14]:
    #ans += (cnt[4]-1)
    #ans += cnt[14] * (cnt[14]-1) // 2 + cnt[14] * (cnt[4] - cnt[14])
    ans += cnt[14] * (cnt[4] - 1)
if cnt[74]:
    ans += cnt[74]

print(ans)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n=int(input())
alist=[0]*101
for i in range(2,n+1):
  for j in factorization(i):
    alist[j[0]]+=j[1]
if n==1:
  print(0)
else:
  ans=0
  for i in range(1,100):
    if alist[i]>=74:
      ans+=1
    if alist[i]>=24:
      for j in range(1,100):
        if i!=j and alist[j]>=2:
          ans+=1
    if alist[i]>=14:
      for j in range(1,100):
        if i!=j and alist[j]>=4:
          ans+=1
    if alist[i]>=2:
      for j in range(1,100):
        for k in range(j+1,100):
          if i!=j and  k!=i and alist[j]>=4 and alist[k]>=4:
            ans+=1
  print(ans)

from collections import Counter
from copy import deepcopy

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

N = int(input())
prime = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
dp = [[0] * 26 for _ in range(N)]
if N == 1:
    print(0)
else:
    for i in range(1,N):
        dp[i] = deepcopy(dp[i-1])
        temp = Counter(prime_factorize(i+1))
        for x in temp.items():
            if len(prime_factorize(x[0])) == 1:
                dp[i][prime.index(x[0])] += x[1]
        four = 0
        two = 0
        fourteen = 0
        twenty_four = 0
        seventy_four = 0
        for j in range(25):
            if dp[i][j] >= 74:
                seventy_four += 1
                twenty_four += 1
                fourteen += 1
                four += 1
                two += 1
            elif dp[i][j] >= 24:
                twenty_four += 1
                fourteen += 1
                four += 1
                two += 1
            elif dp[i][j] >= 14:
                fourteen += 1
                four += 1
                two += 1
            elif dp[i][j] >= 4:
                four += 1
                two += 1
            elif dp[i][j] >= 2:
                two += 1
        dp[i][25] = ((four*(four-1))//2) * (two-2) + twenty_four * (two-1) + fourteen * (four-1) + seventy_four
    print(dp[N-1][25])

n = int(input())
if n==1:
    print(0)
    return
a = [0]*(n+1)
def pf(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
for i in range(2,n+1):
    x = pf(i)
    for j in x:
        a[j] += 1
b = [0]*5 #3,5,15,25,75
for i in a:
    if (i>=74):
        b[4]+=1
    elif (i>=24):
        b[3]+=1
    elif (i>=14):
        b[2]+=1
    elif (i>=4):
        b[1]+=1
    elif (i>=2):
        b[0]+=1
for i in range(4):
    b[3-i] += b[4-i]
ans = 0
ans += b[1]*(b[1]-1)//2*(b[0]-2)
ans += b[2]*(b[1]-1)
ans += b[3]*(b[0]-1)
ans += b[4]
print(ans)

import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])
    if temp != 1:
        arr.append([temp, 1])
    if not arr:
        arr.append([n, 1])
    return arr


def solve():
    N = int(rl())
    
    counter = defaultdict(int)
    for x in range(1, N + 1):
        facts = factorization(x)
        for fact, exp in facts:
            counter[fact] += exp
    
    M = len(list(counter.keys()))
    nums = tuple(counter.values())
    div75 = (1, 3, 5, 15, 25, 75)
    dp = [[0] * 76 for _ in range(M + 1)]
    dp[0][1] = 1
    for i in range(M):
        for div0 in div75:
            for div1 in div75:
                if div0 * div1 <= 75 and div1 <= nums[i] + 1:
                    dp[i + 1][div0 * div1] += dp[i][div0]
    print((dp[M][75]))


def __starting_point():
    solve()

__starting_point()

import sys
read = sys.stdin.read
def main():
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                arr.append([i, cnt])
        if temp != 1:
            arr.append([temp, 1])
        if not arr:
            arr.append([n, 1])
        return arr

    n = int(input())
    if n == 1:
        print(0)
        return
    ps = [1] * 101
    for i1 in range(2, n + 1):
        i1fac = factorization(i1)
        for face in i1fac:
            ps[face[0]] += face[1]
    o3 = 0
    o5 = 0
    o15 = 0
    o25 = 0
    o75 = 0
    for pse in ps:
        o3 += pse >= 3
        o5 += pse >= 5
        o15 += pse >= 15
        o25 += pse >= 25
        o75 += pse >= 75
    r = o75
    r += o25 * (o3 - 1)
    r += o15 * (o5 - 1)
    if o5 >= 2:
        r += (o5 * (o5 - 1) // 2) * (o3 - 2)
    print(r)

def __starting_point():
    main()
__starting_point()

import sys
from collections import Counter

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def prime_factorize(n):
    a = Counter()
    while n % 2 == 0:
        a[2] += 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a[f] += 1
            n //= f
        else:
            f += 2
    if n != 1:
        a[n] += 1
    return a


def main():
    N = int(readline())

    prime = Counter()
    for n in range(1, N + 1):
        prime.update(prime_factorize(n))

    C = [0] * 101
    for v in list(prime.values()):
        C[v] += 1

    for i in range(99, -1, -1):
        C[i] += C[i + 1]

    ans = 0
    ans += (C[2] - 2) * (C[4] * (C[4] - 1) // 2)
    ans += (C[2] - 1) * C[24]
    ans += (C[4] - 1) * C[14]
    ans += C[74]

    print(ans)
    return


def __starting_point():
    main()

__starting_point()

from collections import *

def factorize(n):
    fct = []
    
    for i in range(2, int(n**0.5)+1):
        c = 0
        
        while n%i==0:
            n //= i
            c += 1
            
        if c>0:
            fct.append((i, c))
    
    if n>1:
        fct.append((n, 1))
    
    return fct
    
N = int(input())
cnt = defaultdict(int)

for i in range(1, N+1):
    fct = factorize(i)
    
    for p, c in fct:
        cnt[p] += c

ov74, ov24, ov14, ov4, ov2 = 0, 0, 0, 0, 0

for v in cnt.values():
    if v>=74:
        ov74 += 1
    
    if v>=24:
        ov24 += 1
        
    if v>=14:
        ov14 += 1
    
    if v>=4:
        ov4 += 1
    
    if v>=2:
        ov2 += 1

ans = ov74+ov24*(ov2-1)+ov14*(ov4-1)+ov4*(ov4-1)//2*(ov2-2)
print(ans)

N = int(input())

primes = set(range(2, N+1))
for i in range(2, int(N**0.5+1)):
    primes.difference_update(range(i*2, N+1, i))
primes = list(primes)
primes.sort()

div = [0]*len(primes)

for i in range(2, N+1):
    num = i
    for j, prime in enumerate(primes):
        cnt = 0
        if num < prime: break
        while num%prime == 0:
            cnt += 1
            num //= prime
        div[j] += cnt
        
c74, c24, c14, c4, c2 = 0, 0, 0, 0, 0
for i in div:
    if i>= 74: c74 += 1
    if i >= 24: c24 += 1
    if i >= 14: c14 += 1
    if i >= 4: c4 += 1
    if i >= 2: c2 += 1
ans = 0
ans += c74
ans += (c24) * (c2 - 1)
ans += c14 * (c4 - 1)
ans += (c4) * (c4 - 1) // 2 * (c2 - 2)
print(ans)

N = int(input())

from collections import Counter
def factorize(n):
    d = Counter()
    m = 2
    while m*m <= n:
        while n%m == 0:
            n //= m
            d[m] += 1
        m += 1
    if n > 1:
        d[n] += 1
    return d

fac = Counter()
for n in range(1,N+1):
    fac += factorize(n)

ans = 0
v4 = v2 = 0
for v in fac.values():
    if v >= 4:
        v4 += 1
    elif v >= 2:
        v2 += 1
t = v4 * (v4-1)//2 * (v4-2+v2)
if t > 0:
    ans += t

v24 = v2 = 0
for v in fac.values():
    if v >= 24:
        v24 += 1
    elif v >= 2:
        v2 += 1
t = v24 * (v24-1+v2)
ans += t

v14 = v4 = 0
for v in fac.values():
    if v >= 14:
        v14 += 1
    elif v >= 4:
        v4 += 1
t = v14 * (v14-1+v4)
ans += t

v74 = 0
for v in fac.values():
    if v >= 74:
        v74 += 1
ans += v74

print(ans)

n=int(input())


# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
#factorization(24) 
## [[2, 3], [3, 1]] 
##  24 = 2^3 * 3^1
from collections import defaultdict
d=defaultdict(int)

for i in range(1,n+1):
  x=factorization(i)
  for xi in x:
    d[xi[0]]+=xi[1]
di=defaultdict(int)
for k in d:
  if d[k]>=74:
    di[74]+=1
    di[24]+=1
    di[14]+=1
    di[4]+=1
    di[2]+=1
  elif d[k]>=24:
    di[24]+=1
    di[14]+=1
    di[4]+=1
    di[2]+=1
  elif d[k]>=14:
    di[14]+=1
    di[4]+=1
    di[2]+=1
  elif d[k]>=4:
    di[4]+=1
    di[2]+=1
  elif d[k]>=2:
    di[2]+=1
ans=di[74]
ans+=max(0,di[24]*(di[2]-1))
ans+=max(0,di[14]*(di[4]-1))
ans+=max(0,(di[4]*(di[4]-1))//2*(di[2]-2))
print((max(ans,0)))


n = int(input())

prime_1 = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]
prime_2 = [4,9,25,49]
prime_3 = [8,27]
prime_4 = [16,81]

dp = [0]*15

for i in range(15):
    dp[i] += n // prime_1[i]

for j in range(4):
    dp[j] += n // prime_2[j]
    
for k in range(2):
    dp[k] += n // prime_3[k]

for l in range(2):
    dp[l] += n // prime_4[l]

dp[0] += n // 32
dp[0] += n // 64

n2 = sum(x>1 for x in dp) 
n4 =sum(x>3 for x in dp)
n14=sum(x>13 for x in dp)
n24=sum(x>23 for x in dp)
n74=sum(x>73 for x in dp)

p553 = (n2-n4) * (n4*(n4-1) //2 ) + ((n4*(n4-1)*(n4-2))//2)
p144 = (n4-n14) * n14 + (n14*(n14-1))
p242 = (n2-n24) * n24 + (n24*(n24-1))
p750 = n74

print(p553+p144+p242+p750)

from collections import Counter
from itertools import permutations

n=int(input())

def factorization(n):
    p=2
    fcr=[]
    while p*p<=n:
        while n%p==0:
            fcr.append(p)
            n//=p
        p+=1
    if n>1:
        fcr.append(n)
    return fcr


fcr_l=[]
for i in range(1,n+1):
  fcr=factorization(i)
  fcr_l+=fcr


c=Counter(fcr_l)
fcr_st=set(fcr_l)

ans=[]
for p,q,r in permutations(fcr_st,3):
  if c[p]>=74:
    ans.append(p**74)
  if c[p]>=24 and c[q]>=2:
    ans.append((p**24)*(q**2))
  if c[p]>=14 and c[q]>=4:
    ans.append((p**14)*(q**4))
  if c[p]>=4 and c[q]>=4 and c[r]>=2:
    ans.append((p**4)*(q**4)*(r**2))

print(len(set(ans)))

from collections import Counter
from itertools import chain


def prime_set(N):
    """
    Nまでの素数のsetを返す
    """
    if N < 4:
        return ({}, {}, {2}, {2, 3})[N]
    Nsq = int(N ** 0.5 + 0.5) + 1
    primes = {2, 3} | set(chain(range(5, N + 1, 6), range(7, N + 1, 6)))
    for i in range(5, Nsq, 2):
        if i in primes:
            primes -= set(range(i * i, N + 1, i * 2))
    return primes


def prime_factorization(n):  # 素因数分解
    res = []
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                cnt += 1
                n //= i
            res.append((i, cnt))
    if n > 1:
        res.append((n, 1))
    return res


N = int(input())
primes = {p: 0 for p in prime_set(100)}
for i in range(2, N + 1):
    pf = prime_factorization(i)
    for p, f in pf:
        primes[p] += f


n2 = n4 = n14 = n24 = n74 = 0
for v in primes.values():
    if v >= 74:
        n74 += 1
    if v >= 24:
        n24 += 1
    if v >= 14:
        n14 += 1
    if v >= 4:
        n4 += 1
    if v >= 2:
        n2 += 1

ans = 0
if n74:
    ans += n74
if n24:
    ans += n24 * (n2 - 1)
if n14:
    ans += n14 * (n4 - 1)
if n4 >= 2 and n2:
    ans += n4 * (n4 - 1) // 2 * (n2 - 2)

print(ans)

from itertools import combinations
from collections import defaultdict
n = int(input())


def sieve(n):
    n += 1
    res = [i for i in range(n)]
    for p in range(2, int(n**.5)+1):
        if res[p] < p:
            continue
        for q in range(p**2, n, p):
            if res[q] == q:
                res[q] = p
    return res


U = 100
min_factor = sieve(U)


def prime_factor(n):
    res = defaultdict(int)
    while 1 < n:
        res[min_factor[n]] += 1
        n //= min_factor[n]
    return res


cnt = defaultdict(int)
for i in range(1, n+1):
    for k, v in list(prime_factor(i).items()):
        cnt[k] += v

facts = list(cnt.keys())
ans = 0
# 3,5,5
for subset in combinations(facts, 3):
    for i in range(3):
        can_be = 1
        for j, prim in enumerate(subset):
            if i == j:
                if cnt[prim] < 2:
                    can_be = 0
                    break
            else:
                if cnt[prim] < 4:
                    can_be = 0
                    break
        if can_be:
            ans += 1

# 15,5 3,25
for subset in combinations(facts, 2):
    for i in range(2):
        can_be = 1
        for j, prim in enumerate(subset):
            if i == j:
                if cnt[prim] < 4:
                    can_be = 0
                    break
            else:
                if cnt[prim] < 14:
                    can_be = 0
                    break
        if can_be:
            ans += 1

        can_be2 = 1
        for j, prim in enumerate(subset):
            if i == j:
                if cnt[prim] < 2:
                    can_be2 = 0
                    break
            else:
                if cnt[prim] < 24:
                    can_be2 = 0
                    break
        if can_be2:
            ans += 1

# 74個の場合
if 74 <= cnt[2]:
    ans += 1

print(ans)


#!/usr/bin/env python

n = int(input())

# Eratosthenes' sieve
is_prime = [True for _ in range(100)]
is_prime[0] = is_prime[1] = False
for i in range(100):
    if not is_prime[i]:continue 
    for j in range(i*i, 100, i): 
        if not is_prime[j]: 
            is_prime[j] = False

factor = [0 for _ in range(100)]
for i in range(2, n+1):
    for j in range(2, 100):
        if is_prime[j]:
            while i%j == 0:
                factor[j] += 1
                i //= j

#print('is_prime =', is_prime)
#print('factor =', factor)

fs = []
for i in range(100):
    if factor[i] != 0:
        fs.append(factor[i])

#print('fs =', fs)

m = len(fs)
ans = [0 for _ in range(4)]
for i in range(m):
    for j in range(m):
        for k in range(m):
            if i!=j and j!=k and k!=i:
                if fs[i] >= 4 and fs[j] >= 4 and fs[k] >=2:
                    ans[0] += 1
#                    print('fs[{}] = {}, fs[{}] = {}, fs[{}] = {}'.format(i, fs[i], j, fs[j], k, fs[k]))
for i in range(m):
    if fs[i] >= 74: 
        ans[1] += 1
#        print('fs[{}] = {}'.format(i, fs[i]))
for i in range(m):
    for j in range(m):
        if i!=j:
            if fs[i] >= 2 and fs[j] >= 24: 
                ans[2] += 1
#                print('fs[{}] = {}, fs[{}] = {}'.format(i, fs[i], j, fs[j]))
for i in range(m):
    for j in range(m):
        if i!=j:
            if fs[i] >= 4 and fs[j] >= 14: 
                ans[3] += 1
#                print('fs[{}] = {}, fs[{}] = {}'.format(i, fs[i], j, fs[j]))

Ans = ans[0]//2 + ans[1] + ans[2] + ans[3]
print(Ans)

import sys
import math
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


def make_grid(h, w, num): return [[int(num)] * w for _ in range(h)]

def prime_fact(n):
    root = int(math.sqrt(n))
    prime_dict = {}
    for i in range(2, root+1):
        cnt = 0
        while n % i == 0:
            cnt += 1
            n = n // i
        if cnt:
            prime_dict[i] = cnt
    if n != 1:
        prime_dict[n] = 1
    return prime_dict


def main():
    N = NI()
    PD = {}
    for i in range(2, N+1):
        pd = prime_fact(i)
        for p, k in pd.items():
            PD.setdefault(p, 0)
            PD[p] += k
    X = {74: 0, 24: 0, 14: 0, 4: 0, 2: 0}
    for p, k in PD.items():
        for x in X.keys():
            if k >= x:
                X[x] += 1
    print(X[74] + X[24]*(X[2]-1) + X[14]*(X[4]-1) + X[4]*(X[4]-1)//2 * (X[2]-2))


def __starting_point():
    main()
__starting_point()

# エラトステネスの篩
def make_prime_table(N):
    sieve = [0] * (N + 1)
    sieve[0] = -1
    sieve[1] = -1
    for i in range(2, N + 1):
        if sieve[i] != 0:
            continue
        sieve[i] = i
        for j in range(i * i, N + 1, i):
            if sieve[j] == 0:
                sieve[j] = i
    return sieve

N = int(input())

prime_table = make_prime_table(100)

d = {}
for i in range(2, N + 1):
    while i != 1:
        d.setdefault(prime_table[i], 0)
        d[prime_table[i]] += 1
        i //= prime_table[i]

# 75 = 5 * 5 * 3
#    = 15 * 5
#    = 25 * 3
#    = 75
n74 = 0
n24 = 0
n14 = 0
n4 = 0
n2 = 0
for k in d:
    if d[k] >= 74:
        n74 += 1
    if d[k] >= 24:
        n24 += 1
    if d[k] >= 14:
        n14 += 1
    if d[k] >= 4:
        n4 += 1
    if d[k] >= 2:
        n2 += 1

result = 0
# x ^ 4 * y ^ 4 * z ^ 2 の約数の個数は75個
result += n4 * (n4 - 1) // 2 * (n2 - 2)
# x ^ 14 * y ^ 4 の約数の個数は75個
result += n14 * (n4 - 1)
# x ^ 24 * y ^ 2 の約数の個数は75個
result += n24 * (n2 - 1)
# x ^ 74 の約数の個数は75個
result += n74
print(result)


import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def is_prime(n):
    if n == 1:
        return False
    for k in range(2, int(pow(n, 0.5)) + 1):
        if n % k == 0:
            return False
    return True


def resolve():
    n = int(input())
    primes = []
    for i in range(1, n + 1):
        if is_prime(i):
            primes.append(i)

    fact = []
    for prime in primes:
        ex = 0
        p = prime
        while n // p:
            ex += n // p
            p *= prime
        fact.append(ex)

    cnt_74 = cnt_24 = cnt_14 = cnt_4 = cnt_2 = 0
    for i in fact:
        if i >= 74:
            cnt_74 += 1
        if i >= 24:
            cnt_24 += 1
        if i >= 14:
            cnt_14 += 1
        if i >= 4:
            cnt_4 += 1
        if i >= 2:
            cnt_2 += 1

    res1 = max(0, cnt_24 * (cnt_2 - 1))
    res2 = (cnt_4 * (cnt_4 - 1)) // 2 * max(0, cnt_2 - 2)
    res3 = max(0, cnt_14 * (cnt_4 - 1))
    print((cnt_74 + res1 + res2 + res3))


def __starting_point():
    resolve()

__starting_point()

import math
from collections import defaultdict
import numpy as np
n = int(input())
dic = defaultdict(lambda : 0)
for i in range(2, n + 1):
    sqrt = math.floor(i ** 0.5)
    for j in range(2, sqrt + 1):
        if not i % j:
            count = 0
            while i % j == 0:
                count += 1
                i //= j
            dic[j] += count
    if i > 1:
        dic[i] += 1
values = np.array(list(dic.values()))
v1 = len(values[values >= 2])
v2 = len(values[values >= 4])
v = (v2 * (v2 - 1) // 2) * (v1 - 2)

v3 = len(values[values >= 24])
v += v3 * (v1 - 1)

v4 = len(values[values >= 14])
v += v4 * (v2 - 1)

v5 = len(values[values >= 74])
v += v5
print(v)

from collections import Counter
from math import factorial

def prime_factorize(n):
    a = []
    while n%2 == 0:
        a.append(2)
        n //=2
    f = 3
    while f*f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def prime_factoring(n):
    from collections import Counter
    a = prime_factorize(n)
    return Counter(a)

N = int(input())
fac =factorial(N)
List = list(prime_factoring(fac).values())
# print(List)

def num(m):
    return len(list([x for x in List if x >= m-1]))
print((num(75)+ num(25)*(num(3)-1) + num(15)*(num(5)-1)+ num(5)*(num(5)-1)*(num(3)- 2)//2))


from itertools import permutations
# 3*5*5
# (2, 4, 4) (14, 4) (2, 24) (74)
n = int(input())
d = [0] * (n + 1)
for i in range(2, n + 1):
    for p in range(2, n + 1):
        while i % p == 0:
            i //= p
            d[p] += 1
d = list(filter(int, d))
ans = 0
for i, j, k in permutations(d, 3):
    ans += min(i - 2, j - 4, k - 4) >= 0
ans //= 2
for i, j in permutations(d, 2):
    ans += min(i - 14, j - 4) >= 0
    ans += min(i - 2, j - 24) >= 0
for i in d:
    ans += i - 74 >= 0
print(ans)


#素因数分解
def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf


# 初期入力
from collections import Counter
from collections import defaultdict
from itertools import permutations
import sys
input = sys.stdin.readline  #文字列では使わない
N = int(input())

# Nの階乗の素数列挙
c =defaultdict(int)
for i in range(1,N+1):
    x =soinsu_bunkai(i)
    for j,v in x.items():
        c[j] +=v


ans=set()
for p,q,r in permutations(c.keys(),3):
    if c[p] >=74:
        ans.add(p**74)
    if c[p] >=24 and c[q] >=2:
        ans.add((p**24)*(q**2))
    if c[p] >=14 and c[q] >=4:
        ans.add((p**14)*(q**4))
    if c[p] >=4 and c[q] >=4 and c[r] >=2:
        ans.add((p**4)*(q**4)*(r**2))
    
print(len(ans))

import math
n = int(input())

div = [0]*101

for i in range(2,n+1):
    j=2
    t=i
    while i > 1 and j<=t:
        if i%j==0:
            div[j]+=1
            i//=j
        if i%j!=0:
            j+=1

n2=0
n4=0
n14=0
n24=0
n74=0

for i in range(n):
    if div[i]>=2:
        n2+=1
    if div[i]>=4:
        n4+=1
    if div[i]>=14:
        n14+=1
    if div[i]>=24:
        n24+=1
    if div[i]>=74:
        n74+=1

print((n24*(n2-1)+n14*(n4-1)+n4*(n4-1)//2*(n2-2)+n74))


n = int(input())
if n==1:
    print(0)
    return
primes = [True]*(n+1)
primes[0] = False
primes[1] = False
for i in range(2, n+1):
    if primes[i]:
        for j in range(i*2, n+1, i):
            primes[j] = False
primes = [i for i, j in enumerate(primes) if j]
factors = {2:0, 4:0, 14:0, 24:0, 74:0}
for i in primes:
    tmp = 0
    j = i
    while j<=n:
        tmp += n//j
        j *= i
    for k in factors:
        if tmp>=k:
            factors[k] += 1
ans = factors[4]*(factors[4]-1)*(factors[2]-2)//2
ans += factors[14]*(factors[4]-1)
ans += factors[24]*(factors[2]-1)
ans += factors[74]
print(ans)

#!/usr/bin/env python3
import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7

def cal_divisors(N):
    divisors = []
    i = 1
    while i*i <= N:
        if N % i == 0:
            divisors.append(i)
            if i != N // i:
                divisors.append(N//i)
        i += 1
    divisors.sort()
    return divisors

def prime_factorize(N):
    prime_list = []
    while N % 2 == 0:
        prime_list.append(2)
        N //= 2
    f = 3
    while f**2 <= N:
        if N % f == 0:
            prime_list.append(f)
            N //= f
        else:
            f += 2
    if N != 1:
        prime_list.append(N)
    return prime_list

def main():
    N = int(input())
    divisors = []
    for i in range(1,N+1):
        divisors.extend(prime_factorize(i))
    l = Counter(divisors)
    # print(l)
    # 約数を75個持つ X = a^p * b^q とした時、(p,q) = (0,74), (2,24), (4,14) しかない
    ans = 0
    nums = list(l.values())
    # 74より大きい素因数の数だけ(1)のパターン
    ans += len([*[x for x in nums if x >= 74]])

    # 14,4のパターン
    ans += len([*[x for x in nums if x >= 14]]) * (len([*[x for x in nums if x >= 4]])-1)

    # 24,2のパターン
    ans += len([*[x for x in nums if x >= 24]]) * (len([*[x for x in nums if x >= 2]])-1)

    # 4,4,2のパターン
    ans += len([*[x for x in nums if x >= 4]]) * (len([*[x for x in nums if x >= 4]])-1) * (len([*[x for x in nums if x >= 2]])-2) // 2

    print(ans)

def __starting_point():
    main()

__starting_point()

from collections import defaultdict

n = int(input())
d = defaultdict(int)

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

for i in range(1, n+1):
    for x in prime_factorize(i):
        d[x] += 1

#print(d)



e = defaultdict(int)

l = [2, 4, 14, 24, 74]

#74
for k, v in d.items():
    for x in l:
        if v >= x:
            e[x] += 1

#print(e)

ans = 0

ans += e[74]
ans += e[24] * (e[2] - 1)
ans += e[14] * (e[4] - 1)
ans += (e[4] * (e[4]-1) // 2) * (e[2] - e[4]) + (e[4] * (e[4]-1) * (e[4]-2) // 2)

print(ans)

'''
研究室PCでの解答
'''
import math
#import numpy as np
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7

def main():
    n = int(ipt())
    d = defaultdict(int)
    #nまでの素数の配列を返す関数
    def primes(n):
        if n == 1:
            return []
        else:
            tbl = [True]*(n+1)
            pri = [2]
            for i in range(2,n+1,2):
                tbl[i] = False
            k = 3
            while k <= n:
                if tbl[k]:
                    pri.append(k)
                    for i in range(k,n+1,k):
                        tbl[i] = False
                k += 2
            return pri
    p = primes(n)
    for i in range(2,n+1):
        ii = i
        for j in p:
            while True:
                if ii%j == 0:
                    d[j] += 1
                    ii //= j
                else:
                    break
            if ii == 1:
                break
    d2 = 0
    d4 = 0
    d14 = 0
    d24 = 0
    d74 = 0
    for i in list(d.values()):
        if i >= 2:
            d2 += 1
            if i >= 4:
                d4 += 1
                if i >= 14:
                    d14 += 1
                    if i >= 24:
                        d24 += 1
                        if i >= 74:
                            d74 += 1

    print((d4*(d4-1)*(d2-2)//2+d14*(d4-1)+d24*(d2-1)+d74))

    return None

def __starting_point():
    main()

__starting_point()

# coding: utf-8

# https://atcoder.jp/contests/abc114
# 14:44-15:24 done


def soinsubunkai(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def main():
    N = int(input())

    soinsu = {}
    for i in range(2, N+1):
        i_soinsu = soinsubunkai(i)
        for p, idx in i_soinsu:
            if p not in soinsu:
                soinsu[p] = idx
            else:
                soinsu[p] += idx

    n_75, n_25, n_15, n_5, n_3 = 0, 0, 0, 0, 0
    for v in list(soinsu.values()):
        if v >= 74:
            n_75 += 1
        if v >= 24:
            n_25 += 1
        if v >= 14:
            n_15 += 1
        if v >= 4:
            n_5 += 1
        if v >= 2:
            n_3 += 1

    n_3_5_5 = n_5 * (n_5-1) * (n_3-2) // 2
    n_5_15 = n_15 * (n_5-1)
    n_3_25 = n_25 * (n_3-1)

    return n_3_5_5 + n_5_15 + n_3_25 + n_75


print((main()))


import sys
import math
import collections
import bisect
import copy

# import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: list(map(int, sys.stdin.readline().split()))
na = lambda: list(map(int, sys.stdin.readline().split()))
na1 = lambda: list([int(x) - 1 for x in sys.stdin.readline().split()])


# ===CODE===


def main():
    def prime_factorize(n):
        a = []
        while n % 2 == 0:
            a.append(2)
            n //= 2
        f = 3
        while f * f <= n:
            if n % f == 0:
                a.append(f)
                n //= f
            else:
                f += 2
        if n != 1:
            a.append(n)
        return a

    n = ni()
    divisor = [0 for _ in range(101)]

    ans = 0
    for i in range(1, n + 1):
        a = prime_factorize(i)
        for ai in a:
            divisor[ai] += 1

    over75 = 0
    over25 = 0
    over15 = 0
    over5 = 0
    over3 = 0
    for di in divisor:
        tmp = di + 1
        if tmp >= 75:
            over75 += 1
        if tmp >= 25:
            over25 += 1
        if tmp >= 15:
            over15 += 1
        if tmp >= 5:
            over5 += 1
        if tmp >= 3:
            over3 += 1

    ans = over75 + over25 * (over3 - 1) + over15 * (over5 - 1) + over5 * (over5 - 1) // 2 * (over3 - 2)

    print(ans)


def __starting_point():
    main()

__starting_point()

import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def primeFactorization(n):
    ans = []
    temp = n
    while temp%2 == 0:
        ans.append(2)
        temp //= 2
    for i in range(3, int(n**0.5)+1, 2):
        while temp%i == 0:
            ans.append(i)
            temp //= i
    if temp > 1:
        ans.append(temp)
    return collections.Counter(ans)

def resolve():
    N = I()

    # N!の素因数を求める
    pf_N_fact = collections.Counter()
    for i in range(1, N + 1):
        pf = primeFactorization(i)
        for k, v in list(pf.items()):
            pf_N_fact[k] += v
    l = list(pf_N_fact.values())
    l.sort()
    pf_num = len(pf_N_fact)

    # 約数75個: 素因数の個数+1の積が75になるように組み合わせる
    # 素因数の個数を以下の組み合わせで何通り取れるかを調べる
    # (2, 4, 4), (2, 24), (4, 14), (74)
    ans = 0
    num_2 = pf_num - bisect.bisect_left(l, 2)
    num_4 = pf_num - bisect.bisect_left(l, 4)
    num_14 = pf_num - bisect.bisect_left(l, 14)
    num_24 = pf_num - bisect.bisect_left(l, 24)
    num_74 = pf_num - bisect.bisect_left(l, 74)
    ans += num_4 * (num_4 - 1) // 2 * (num_2 - 2)
    ans += num_24 * (num_2 - 1)
    ans += num_14 * (num_4 - 1)
    ans += num_74
    print(ans)

def __starting_point():
    resolve()

__starting_point()

from collections import Counter, defaultdict

N = int(input())

# 素数のリスト
def createPrimeList(N, isTable=True):
    isPrime = [True] * (N + 1)
    isPrime[0] = False
    isPrime[1] = False
    for i in range(2, N):
        if not isPrime[i]:
            continue
        for p in range(i * 2, N, i):
            isPrime[p] = False
    return isPrime if isTable else [i for i in range(2, N) if isPrime[i]]

# 素因数分解(複数回)
primeList = createPrimeList(100, False)
def primeFactorization(N):
    primes = Counter()
    for p in primeList:
        while N % p == 0:
            N //= p
            primes[p] += 1
    return primes
primes = Counter()
for i in range(1, N + 1):
    primes += primeFactorization(i)

cnt = defaultdict(int)
for c in list(primes.values()):
    c += 1
    for d in (3, 5, 15, 25, 75):
        if c >= d:
            cnt[d] += 1

ans = 0
ans += cnt[5] * (cnt[5] - 1) * (cnt[3] - 2) // 2
ans += cnt[25] * (cnt[3] - 1)
ans += cnt[15] * (cnt[5] - 1)
ans += cnt[75]
print(ans)


import sys
import math
import itertools


# \n
def input():
    return sys.stdin.readline().rstrip()


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
                arr.append(i)

    if temp != 1:
        arr.append(temp)

    if arr == []:
        arr.append(n)
    return arr


def main():
    N = int(input())

    P = [0] * (N + 1)

    for i in range(1, N + 1):
        arr = factorization(i)
        for s in arr:
            P[s] += 1

    ans = 0
    PN = []
    for j in P:
        if j != 0:
            PN.append(j)

    ans = 0
    count = 0
    # 75**
    for i in PN:
        if i >= 74:
            count += 1
    ans += count

    count = 0
    # 25*3
    sub1 = 0
    sub2 = 0
    for i in PN:

        if i >= 24:
            sub1 += 1
        if i >= 2:
            sub2 += 1
    ans += sub1 * (sub2 - 1)

    # 15*5
    sub1 = 0
    sub2 = 0
    for i in PN:

        if i >= 14:
            sub1 += 1
        if i >= 4:
            sub2 += 1
    ans += sub1 * (sub2 - 1)

    # 5*5*3
    sub1 = 0
    sub2 = 0
    for i in PN:

        if i >= 4:
            sub1 += 1
        if i >= 2:
            sub2 += 1
    ans += sub1 * (sub1 - 1)*(sub2-2)//2


    print(ans)

def __starting_point():
    main()

__starting_point()

from collections import defaultdict
N = int(input())
prm = defaultdict(int)
for n in range(2, N+1):
    for p in range(2, int(n**0.5)+2):
        while n % p == 0:
            prm[p] += 1
            n //= p
        if n == 1:
            break
    else:
        prm[n] += 1
C = [2, 4, 14, 24, 74]
cnt = [0]*5
for p, x in list(prm.items()):
    for i, c in enumerate(C):
        if x >= c:
            cnt[i] += 1
c2, c4, c14, c24, c74 = cnt

ans = c4*(c4-1)//2*(c2-2) if c2 > 2 else 0
ans += max(0, c24*(c2-1))
ans += max(0, c14*(c4-1))
ans += c74
print(ans)


from collections import Counter
N = int(input())

l = []
for i in range(1, N+1):
  while i % 2 == 0:
    l.append(2)
    i //= 2
  f = 3
  while f * f <= i:
    if i % f == 0:
      l.append(f)
      i //= f
    else:
      f += 2
  if i != 1:
    l.append(i)

c = Counter(l)
m = c.most_common()
c_75, c_25, c_15, c_5, c_3 = 0, 0, 0, 0, 0
for a in m:
  if a[1] >= 74:
    c_75 += 1
  if a[1] >= 24:
    c_25 += 1
  if a[1] >= 14:
    c_15 += 1
  if a[1] >= 4:
    c_5 += 1
  if a[1] >= 2:
    c_3 += 1
    
ans = c_75
ans += c_25 * (c_3-1)
ans += c_15 * (c_5-1)
ans += (c_5*(c_5-1)//2) * (c_3-2)
print(ans)

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


n = int(input())

d = {}
for i in range(2, n+1):
    p = prime_factorize(i)
    for cp in p:
        if cp in d:
            d[cp] += 1
        else:
            d[cp] = 1

cnt = {75:0, 25:0, 15:0, 5:0, 3:0}
for i in d:
    for j in cnt:
        if d[i] >= j-1:
            cnt[j] += 1
ans = cnt[75] + cnt[25]*(cnt[3]-1) + cnt[15]*(cnt[5]-1) + cnt[5]*(cnt[5]-1)//2*(cnt[3]-2)
print(ans)

# エラトステネスの篩
def make_prime_table(N):
    sieve = list(range(N + 1))
    sieve[0] = -1
    sieve[1] = -1
    for i in range(2, int(N ** 0.5) + 1):
        if sieve[i] != i:
            continue
        for j in range(i * i, N + 1, i):
            if sieve[j] == j:
                sieve[j] = i
    return sieve


N = int(input())

prime_table = make_prime_table(100)

d = {}
for i in range(2, N + 1):
    while i != 1:
        d.setdefault(prime_table[i], 0)
        d[prime_table[i]] += 1
        i //= prime_table[i]

# 75 = 5 * 5 * 3
#    = 15 * 5
#    = 25 * 3
#    = 75
n74 = 0
n24 = 0
n14 = 0
n4 = 0
n2 = 0
for k in d:
    if d[k] >= 74:
        n74 += 1
    if d[k] >= 24:
        n24 += 1
    if d[k] >= 14:
        n14 += 1
    if d[k] >= 4:
        n4 += 1
    if d[k] >= 2:
        n2 += 1

result = 0
# x ^ 4 * y ^ 4 * z ^ 2 の約数の個数は75個
result += n4 * (n4 - 1) // 2 * (n2 - 2)
# x ^ 14 * y ^ 4 の約数の個数は75個
result += n14 * (n4 - 1)
# x ^ 24 * y ^ 2 の約数の個数は75個
result += n24 * (n2 - 1)
# x ^ 74 の約数の個数は75個
result += n74
print(result)


c=[0]*101
for i in range(1,int(input())+1):
    for j in range(2,i+1):
        while i%j==0:
            c[j]+=1
            i//=j
def f(n):
    return sum(i>n-2 for i in c)
print(f(75)+f(25)*(f(3)-1)+f(15)*(f(5)-1)+f(5)*(f(5)-1)*(f(3)-2)//2)

import sys
from collections import defaultdict

input = sys.stdin.readline


def calc_prime_factors(n, count=False):
    """Trial division"""
    factors = []
    # factor: 2
    while n % 2 == 0:
        factors.append(2)
        n //= 2
    # factor: 3, 5, 7, 11, ...
    f = 3
    root_n = int(n ** 0.5) + 1
    while f <= root_n:
        if n % f == 0:
            factors.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factors.append(n)
    return factors


def main():
    N = int(input())

    n_factor = defaultdict(int)
    for n in range(1, N + 1):
        factors = calc_prime_factors(n)
        for f in factors:
            n_factor[f] += 1

    n_factor = list(n_factor.values())
    n_factor.sort()
    ans = 0

    # 75 = 3 x 3 x 5 : (2, 4, 4)
    A, B = 0, 0
    for n in n_factor:
        if 2 <= n <= 3:
            A += 1
        elif 4 <= n:
            B += 1
    ans += A * B * (B - 1) // 2 + B * (B - 1) * (B - 2) // 6 * 3

    # 75 = 3 x 25 : (2, 24)
    A, B = 0, 0
    for n in n_factor:
        if 2 <= n <= 23:
            A += 1
        elif 24 <= n:
            B += 1
    ans += A * B + B * (B - 1)

    # 75 = 5 x 15 : (4, 14)
    A, B = 0, 0
    for n in n_factor:
        if 4 <= n <= 13:
            A += 1
        elif 14 <= n:
            B += 1
    ans += A * B + B * (B - 1)

    # 75 = 75 : (74,)
    A = 0
    for n in n_factor:
        if 74 <= n:
            A += 1
    ans += A

    print(ans)


def __starting_point():
    main()

__starting_point()

import sys
input = lambda: sys.stdin.readline().rstrip()
 
n = int(input())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
from collections import defaultdict
d = defaultdict(int)
for i in range(2, n + 1):
    a = prime_factorize(i)
    for j in a:
        d[j] += 1
cnt_74 = []
cnt_2 = []
cnt_4 = []
cnt_14 = []
cnt_24 = []
for i in d:
    if d[i] >= 74:
        cnt_74.append(i)
    if d[i] >= 2:
        cnt_2.append(i)
    if d[i] >= 4:
        cnt_4.append(i)
    if d[i] >= 14:
        cnt_14.append(i)
    if d[i] >= 24:
        cnt_24.append(i)
ans = 0
ans += len(cnt_74)

for i in cnt_2:
    for j in cnt_24:
        if i != j:
            ans += 1
for i in cnt_4:
    for j in cnt_14:
        if i != j:
            ans += 1
for i in cnt_2:
    for j in range(len(cnt_4)):
        for k in range(j + 1, len(cnt_4)):
            j_ = cnt_4[j]
            k_ = cnt_4[k]
            if i != j_ and j_ != k_ and k_ != i:
                ans += 1
print(ans)
#print(d)


from collections import defaultdict
import math

N = int(input())
D = defaultdict(int)

def primes(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]:
            continue
        for j in range(i*2, n+1, i):
            is_prime[j] = False
    return [i for i in range(n+1) if is_prime[i]]

def prime_cnt(p, n):
  cnt = 0
  temp = p
  while temp <= n:
    cnt += n//temp
    temp *= p
  return cnt

def conb(n, r):
  if n <= 0 or n < r:
    return 0
  elif r == 1:
    return n
  else:  
    return n * (n-1) // 2

for p in primes(N):
  D[p] += prime_cnt(p, N)

C = [0]*5
L = [3, 5, 15, 25, 75]

for i in D.values():
  for j in range(5):
    if i >= L[j] - 1:
      C[j] += 1

ans = 0
ans += conb(C[4], 1)
ans += conb(C[3], 1) * conb(C[0]-1, 1)
ans += conb(C[2], 1) * conb(C[1]-1, 1)
ans += conb(C[1], 2) * conb(C[0]-2, 1)

print(ans)

N = int(input())
e = [0] * (N+1)

#N！を素因数分解した時の指数を列挙
for i in range(2, N+1):
    cur = i
    for j in range(2, i+1):
        while cur % j == 0:
            e[j] += 1
            cur //= j
# print(e)
def num(m): #eの要素のうちm-1以上のものの個数
    return len(list(filter(lambda x: x>=m-1, e)))


print(num(75) + num(25) * (num(3) - 1) + num(15) * (num(5) - 1) + num(5) * (num(5) - 1) * (num(3) - 2) // 2)

n = int(input())

prime_factor = {1: 1} if n == 1 else {}
for i in range(2, n+1):
    while i % 2 == 0:
        prime_factor[2] = prime_factor.get(2, 0) + 1
        i //= 2
    f = 3
    while f * f <= i:
        if i % f == 0:
            prime_factor[f] = prime_factor.get(f, 0) + 1
            i //= f
        else:
            f += 2
    if i != 1:
        prime_factor[i] = prime_factor.get(i, 0) + 1

m = len(prime_factor)
prime = list(prime_factor.keys())

dp = [[0]*76 for _ in range(m+2)]
dp[0][1] = 1
for i in range(m):
    for j in range(76):
        for k in range(prime_factor[prime[i]]+1):
            if (v := j * (k+1)) < 76:
                dp[i+1][v] += dp[i][j]

print((dp[m][75]))


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


N = int(input())

prime = dict()
for i in range(2, N+1):
    prime_i = factorization(i)
    for p, num in prime_i:
        if p in prime:
            prime[p] += num
        else:
            prime[p] = num

divisor_75 = 0
divisor_25 = 0
divisor_15 = 0
divisor_5 = 0
divisor_3 = 0
for v in prime.values():
    if v >= 74:
        divisor_75 += 1
    if v >= 24:
        divisor_25 += 1
    if v >= 14:
        divisor_15 += 1
    if v >= 4:
        divisor_5 += 1
    if v >= 2:
        divisor_3 += 1

ans = 0
ans += divisor_75
ans = max(ans, ans + divisor_25 * (divisor_3 - 1))
ans = max(ans, ans + divisor_15 * (divisor_5 - 1))
ans = max(ans, ans + ((divisor_5 * (divisor_5 - 1)) // 2) * (divisor_3 - 2))

print(ans)

n = int(input())
pf={}
for m in range(1,n+1):
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=pf.get(m,0)+1
ans = 0
for k , v in pf.items():
    if v >= 74:
        ans += 1
    if v >= 24:
        for s , t in pf.items():
            if s != k and t >= 2:
                ans += 1
    if v >= 14:
        for s , t in pf.items():
            if s != k and t >= 4:
                ans += 1
    if v >= 4:
        for s , t in pf.items():
            if s > k and t >= 4:
                for f , g in pf.items():
                    if f != s and f != k and g >= 2:
                        ans += 1
print(ans)

def fact(A):
    c0 = A
    r = 2
    lis = []
    count = 1
    while A != 1:
        if A%r == 0:
            A = A//r
            lis.append(r)
            r = 2
        else:
            r += 1
        if r > int(pow(c0,0.5))+1:
            lis.append(A)
            break
    return(lis)
n = int(input())
lis = []
for i in range(2,n+1):
    lis.extend(fact(i))
lis = sorted(lis)
L = set(lis)
import collections
c = collections.Counter(lis)
x = [0,0,0,0,0]
for R in L:
    if c[R] >= 2:
        x[0] += 1
    if c[R] >= 4:
        x[1] += 1
    if c[R] >= 14:
        x[2] += 1
    if c[R] >= 24:
        x[3] += 1
    if c[R] >= 74:
        x[4] += 1
ans = max((x[0]-2)*(x[1]-1)*x[1]//2, 0) + max((x[1]-1)*x[2], 0) + max((x[0]-1)*x[3], 0) + x[4]
print(ans)

class Prime:
    # https://qiita.com/daikw/items/f48d6ac374255763463d
    seed_primes = [
        2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
        71, 73, 79, 83, 89, 97
    ]

    def is_prime(self, n):
        """
        prime test (hybrid)

        see also: https://qiita.com/gushwell/items/ff9ed83ba55350aaa369

        :param n:
        :return: boolean
        """
        is_prime_common = self.is_prime_common(n)
        if is_prime_common is not None:
            return is_prime_common

        if n < 2000000:
            return self.is_prime_brute_force(n)
        else:
            return self.is_prime_miller_rabin(n)

    def is_prime_common(self, n):
        if n == 1: return False
        if n in Prime.seed_primes: return True
        if any([n % x == 0 for x in self.seed_primes]): return False

    def is_prime_brute_force(self, n):
        """
        brute force prime test
        use with is_prime_common if you want to skip seed_primes

        :param n:
        :return: boolean
        """
        for k in range(2, int(math.sqrt(n)) + 1):
            if n % k == 0:
                return False
        return True

    def is_prime_miller_rabin(self, n):
        """
        miller rabin prime test
        use with is_prime_common if you want to skip seed_primes

        see also
            algorithm: https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test
            implementation: https://qiita.com/srtk86/items/609737d50c9ef5f5dc59
            improvement: https://qiita.com/gushwell/items/ff9ed83ba55350aaa369

        :param n:
        :return: boolean
        """

        d = n - 1
        while d & 1 == 0:
            d >>= 1

        # use one of these lines / upper is more efficient.
        witnesses = self.get_witnesses(n)
        # witnesses = [random.randint(1, n - 1) for _ in range(100)]

        for w in witnesses:
            y = pow(w, d, n)

            while d != n - 1 and y != 1 and y != n - 1:
                y = (y * y) % n
                d <<= 1

            if y != n - 1 and d & 1 == 0:
                return False

        return True

    def get_witnesses(self, num):
        def _get_range(num):
            if num < 2047:
                return 1
            if num < 1373653:
                return 2
            if num < 25326001:
                return 3
            if num < 3215031751:
                return 4
            if num < 2152302898747:
                return 5
            if num < 3474749660383:
                return 6
            if num < 341550071728321:
                return 7
            if num < 3825123056546413051:
                return 9
            return 12

        return self.seed_primes[:_get_range(num)]

    def gcd(self, a, b):
        if a < b:
            return self.gcd(b, a)
        if b == 0:
            return a
        while b:
            a, b = b, a % b
        return a

    @staticmethod
    def f(x, n, seed):
        """
        pseudo prime generator
        :param x:
        :param n:
        :param seed:
        :return: pseudo prime
        """
        p = Prime.seed_primes[seed % len(Prime.seed_primes)]
        return (p * x + seed) % n

    def find_factor(self, n, seed=1):
        """
        find one of factor of n
        this function is based to Pollard's rho algorithm

        see also
            algorithm: https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm
            implementation: https://qiita.com/gushwell/items/561afde2e00bf3380c98

        :param n:
        :param seed:
        :return: factor
        """
        if self.is_prime(n):
            return n

        x, y, d = 2, 2, 1
        count = 0
        while d == 1:
            count += 1
            x = self.f(x, n, seed)
            y = self.f(self.f(y, n, seed), n, seed)
            d = self.gcd(abs(x - y), n)

        if d == n:
            return self.find_factor(n, seed + 1)
        return self.find_factor(d)

    def find_factors(self, n):
        primes = {}
        if self.is_prime(n):
            primes[n] = 1
            return primes

        while n > 1:
            factor = self.find_factor(n)

            primes.setdefault(factor, 0)
            primes[factor] += 1

            n //= factor

        return primes


import collections
N = int(input())
c = collections.defaultdict(int)
for i in range(1, N + 1):
    factors = Prime().find_factors(i)
    for k, v in list(factors.items()):
        c[k] += v
d = list(c.values())
#3*5*5=3*25=5*15=75
#a^b*c^dの約数は(b+1)*(d+1)個
n75 = sum(i >= 74 for i in d)
n25 = sum(i >= 24 for i in d)
n15 = sum(i >= 14 for i in d)
n5 = sum(i >= 4 for i in d)
n3 = sum(i >= 2 for i in d)

ans = n5 * (n5 - 1) * (n3 - 2) // 2
ans += n25 * (n3 - 1)
ans += n15 * (n5 - 1)
ans += n75
print(ans)


import sys
from collections import Counter

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def prime_factorize(n):
    a = Counter()
    while n % 2 == 0:
        a[2] += 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a[f] += 1
            n //= f
        else:
            f += 2
    if n != 1:
        a[n] += 1
    return a


def com(n, r):
    if n < r or n < 0 or r < 0:
        return 0
    r = min(r, n - r)
    numer = denom = 1
    for i in range(n - r + 1, n + 1):
        numer = numer * i
    for i in range(1, r + 1):
        denom = denom * i
    return numer // denom


def main():
    N = int(readline())

    prime = Counter()
    for n in range(1, N + 1):
        prime.update(prime_factorize(n))

    C = [0] * 101
    for v in list(prime.values()):
        C[v] += 1

    for i in range(99, -1, -1):
        C[i] += C[i + 1]

    ans = 0
    ans += (C[2] - 2) * com(C[4], 2)
    ans += (C[2] - 1) * C[24]
    ans += (C[4] - 1) * C[14]
    ans += C[74]

    print(ans)
    return


def __starting_point():
    main()

__starting_point()

from collections import defaultdict
import math
n = int(input())
def is_prime(n):
  if n == 1:
    return False
  
  for k in range(2, int(math.sqrt(n)) + 1):
    if n%k == 0:
      return False
  return True

d = defaultdict(int)

p = []
for i in range(2,n+1):
  if is_prime(i):
    d[i] = 1
    p.append(i)
    continue
  x = i
  for j in p:
    while x%j == 0:
      x //= j
      d[j] += 1

#75
c = 0
for i in list(d.values()):
  if i >= 74:
    c += 1
ans = c

#25 * 3
c,e = 0,0
for i in list(d.values()):
  if i >= 24:
    c += 1
  if i >= 2:
    e += 1
ans += c*(e-1)

#15 * 5
c, e = 0, 0
for i in list(d.values()):
  if i >= 14:
    c += 1
  if i >= 4:
    e += 1
ans += c*(e-1)

#5 * 5 * 3
c,e = 0,0
for i in list(d.values()):
  if i >= 4:
    c += 1
  if i >= 2:
    e += 1
ans += (c*(c-1)//2)*(e-2)

print (ans)



N=int(input())
e=[0]*(N+1)
for i in range(2,N+1):
    cur=i
    for j in range(2,i+1):
        while cur%j==0:
            e[j]+=1
            cur//=j

def num(m):
    return len(list(filter(lambda x:x>=m-1,e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)

"""
75数の条件
約数の個数は各素因数の個数a1,a2,a3,...について
(a1+1)(a2+1)...(an+1)
75=3*5*5
->素因数の個数が2個, 4個, 4個になるような組み合わせ
(2,4,4)
(14,4)
(2,24)
(74)

求め方
1〜Nについて、素因数の数をdictに収めていく
->そのうち、4個以上あるものの組み合わせと2個以上あるものの組み合わせでカウントする
"""
import copy
N=int(input())
sosu=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]
soinsu=dict()
for n in range(2,N+1):
  if n in sosu:
    soinsu[n]=1
  else:
    x = copy.deepcopy(n)
    i = 0
    while i<len(sosu):
      if x % sosu[i]==0:
        soinsu[sosu[i]]+=1
        x = x//sosu[i]
      else:
        i += 1

ans = 0
cnt=[0,0,0,0,0]
tit=[2,4,14,24,74]
for _,v in soinsu.items():
  for i in range(5):
    cnt[i] += 1 if v >= tit[i] else 0

# (2,4,4)
ans+= cnt[1]*(cnt[1]-1)//2*(cnt[0]-2)
# (14,4)
ans+= cnt[2]*(cnt[1]-1)
# (2,24)
ans+= cnt[3]*(cnt[0]-1)
# (74)
ans+= cnt[4]
print(ans)

import collections

n = int(input())

div = []

for i in range(1,n+1):
    for j in range(2,int(n**0.5)+1):
        while i % j == 0:
            div.append(j)
            i //= j
    if i > 1:
        div.append(i)

c = collections.Counter(div)
    
n2,n4,n14,n24,n74 = 0,0,0,0,0

for k,v in list(c.items()):
    if v >= 2:
        n2 += 1
    if v >= 4:
        n4 += 1
    if v >= 14:
        n14 += 1
    if v >= 24:
        n24 += 1
    if v >= 74:
        n74 += 1

ans = n74 + n24*(n2-1) + n14*(n4-1) + n4*(n4-1)*(n2-2)//2

print(ans)




from collections import Counter
n = int(input())

def factorization(n):
    c = Counter()
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            c[i]=cnt
    if temp!=1:
        c[temp]=1
    if len(c)==0:
        c[n]=1
    c[1] = 0
    return c

def isOk(c):
    ret = 1
    for _,v in c.items():
        ret*=(v+1)
    return ret

c = Counter([])
for i in range(1, n+1):
    c += factorization(i)

# cから適当に約数を選んで約数の個数が75となるように選ぶ
# factorization(75): [5,2][3,1]
lc = [[k, v] for k, v in c.items()]

ans=0
# 一つの素因数が75個
f75 = sum([1 for v in c.values() if v >= 74])
ans+=f75
# 3, 3, 5のパターン
f3 = sum([1 for v in c.values() if v >= 2])
f5 = sum([1 for v in c.values() if v >= 4])
f15 = sum([1 for v in c.values() if v >= 14])
f25 = sum([1 for v in c.values() if v >= 24])
ans+=f15*(f5-1)
ans+=f25*(f3 - 1)
if f5 >= 2:
    ans+=(f5*(f5-1)//2)*(f3-2)
print(ans)

from collections import defaultdict


def main():
    n = int(input())
    fact = defaultdict(int)
    for i in range(2, n + 1):
        j = i
        while j % 2 == 0:
            j //= 2
            fact[2] += 1
        k = 3
        while k * k <= j:
            if j % k:
                k += 2
            else:
                j //= k
                fact[k] += 1
        if j != 1:
            fact[j] += 1
    fact = list(fact.items())
    length = len(fact)
    ans = 0
    for i in range(length):
        if fact[i][1] >= 74:
            ans += 1
    product = set()
    for small_p, large_p in [[2, 24], [4, 14]]:
        for i in range(length):
            for j in range(length):
                if i == j:
                    continue
                now = pow(fact[i][0], large_p) * pow(fact[j][0], small_p)
                if fact[i][1] >= large_p and fact[j][1] >= small_p and now not in product:
                    ans += 1
                    product.add(now)
    for i in range(length):
        for j in range(length):
            for k in range(length):
                if i == j or j == k or i == k:
                    continue
                now = pow(fact[i][0], 4) * pow(fact[j][0], 4) * pow(fact[k][0], 2)
                if fact[i][1] >= 4 and fact[j][1] >= 4 and fact[k][1] >= 2 and now not in product:
                    ans += 1
                    product.add(now)
    print(ans)


def __starting_point():
    main()

__starting_point()

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

def conb(n,r): 
    if n<r: return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def prime_factorize(n):
    if n == 1:
        return [1]
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = inp()
d = defaultdict(int)
for i in range(1,n+1):
    for x in prime_factorize(i):
        d[x] += 1

valist = list(d.values())
c = [2,4,14,24,74]
cnt = [0] * 5
for x in valist:
    if x >= 74: cnt[4] += 1
    elif x >= 24: cnt[3] += 1
    elif x >= 14: cnt[2] += 1
    elif x >= 4: cnt[1] += 1
    elif x >= 2: cnt[0] += 1
# print(cnt)
res = 0
a = sum(cnt[1:]); b = cnt[0]
res += conb(a,3)*3 + conb(a,2)*b
a = sum(cnt[2:]); b = cnt[1]
res += a*(a-1) + a*b
a = sum(cnt[3:]); b = sum(cnt[:3])
res += a*(a-1) + a*b
res += cnt[4]
print(res)


# エラトステネスの篩
def make_prime_table(n):
    sieve = list(range(n + 1))
    sieve[0] = -1
    sieve[1] = -1
    for i in range(2, int(n ** 0.5) + 1):
        if sieve[i] != i:
            continue
        for j in range(i * i, n + 1, i):
            if sieve[j] == j:
                sieve[j] = i
    return sieve


def prime_factorize(n):
    result = []
    while n != 1:
        p = prime_table[n]
        c = 0
        while n % p == 0:
            n //= p
            c += 1
        result.append((p, c))
    return result


N = int(input())

prime_table = make_prime_table(N)
d = {}
for i in range(2, N + 1):
    for p, c in prime_factorize(i):
        d.setdefault(p, 0)
        d[p] += c

# 75 = 5 * 5 * 3
#    = 15 * 5
#    = 25 * 3
#    = 75
n74 = 0
n24 = 0
n14 = 0
n4 = 0
n2 = 0
for k in d:
    if d[k] >= 74:
        n74 += 1
    if d[k] >= 24:
        n24 += 1
    if d[k] >= 14:
        n14 += 1
    if d[k] >= 4:
        n4 += 1
    if d[k] >= 2:
        n2 += 1

result = 0
# x ^ 4 * y ^ 4 * z ^ 2 の約数の個数は75個
result += n4 * (n4 - 1) // 2 * (n2 - 2)
# x ^ 14 * y ^ 4 の約数の個数は75個
result += n14 * (n4 - 1)
# x ^ 24 * y ^ 2 の約数の個数は75個
result += n24 * (n2 - 1)
# x ^ 74 の約数の個数は75個
result += n74
print(result)


# 

def factorize(n):
    '''
    タプルの配列と思ったけど逐次割り算する過程で次数を増やせないじゃん。
    二重配列?
    dictにしよう。
    '''
    if n == 1:
        raise('n >= 2')
    
    factor = {}
    div = 2
    while True:
        if n % div == 0:
            n //= div
            factor[div] = factor.get(div, 0) + 1
            if n == 1:
                return factor
        else:
            div += 1

n = int(input())

if n <= 9:
    print(0)
    return

# めんどいから掛けてしまえ。間に合うだろ
import math
product = math.prod(range(1, n+1))
d = factorize(product)
factor = list(d.items())

# print(factor)

ans = 0
for i in range(len(factor)):
    for j in range(i+1, len(factor)):
        for k in range(len(factor)):
            if factor[i][1] >= 4 and factor[j][1] >= 4 and factor[k][1] >= 2 and i!=j and j!=k and k!=i:
                ans += 1

for i in range(len(factor)):
    for j in range(len(factor)):
            if factor[i][1] >= 4 and factor[j][1] >= 14 and i!=j:
                ans += 1

for i in range(len(factor)):
    for j in range(len(factor)):
            if factor[i][1] >= 2 and factor[j][1] >= 24 and i!=j:
                ans += 1

for i in range(len(factor)):
    if factor[i][1] >= 74:
                ans += 1

print(ans)

from math import sqrt
def sieve(n):
    if n <= 4:
        return list(range(2, n))
    def _sieve_of_eratosthenes(n):
        limit = int(sqrt(n))+1
        *table, = [1] * n
        table[0] = table[1] = 0
        for i in range(2, limit):
            if table[i]:
                for j in range(i**2, n, i):
                    table[j] = 0
        return [i for i in range(2, n) if table[i]]
    return _sieve_of_eratosthenes(n)

def factorint(n):
    d = {}
    for i in range(2, int(sqrt(n))+1):
        c = 0
        q, r = divmod(n, i)
        while not r:
            c += 1
            n = q
            q, r = divmod(n, i)
        if c:
            d[i] = c
    if n != 1:
        d[n] = 1
    return d

n = int(input())
P = sieve(n+1)
d = {p:i for i, p in enumerate(P)}
X = [1] * len(P)
for i in range(2, n+1):
    for k, v in factorint(i).items():
        X[d[k]] += v
nb_3 = len([x for x in X if x >= 3])
nb_5 = len([x for x in X if x >= 5])
nb_15 = len([x for x in X if x >= 15])
nb_25 = len([x for x in X if x >= 25])
nb_75 = len([x for x in X if x >= 75])
print(nb_75 + nb_25*(nb_3-1) + nb_15*(nb_5-1) + nb_5*(nb_5-1)*(nb_3-2)//2)

def calc(N,p):
  ans = 0
  i = p
  while N>=i:
    ans += N//i
    i *= p
  return ans

def sieve(n):
  is_prime = [True for _ in range(n+1)]
  is_prime[0] = False
  for i in range(2, n+1):
    if is_prime[i-1]:
      j = 2 * i
      while j <= n:
        is_prime[j-1] = False
        j += i
  table = [i for i in range(1, n+1) if is_prime[i-1]]
  return table
  
from itertools import groupby, accumulate, product, permutations, combinations
def check(value,lis):
  ans = 0
  n = len(lis)
  for perm in permutations(value,n):
    for i in range(n):
      if perm[i]<lis[i]:
        break
    else:
      ans += 1
  return ans

def solve():
  N = int(input())
  table = sieve(N)
  v = []
  for p in table:
    v.append(calc(N,p))
  v.sort(reverse=True)
  ans = 0
  ans += check(v,[74])
  ans += check(v,[24,2])
  ans += check(v,[14,4])
  ans += check(v,[4,4,2])//2
  return ans
print(solve())

n = int(input())
l = [0]*101
i = 2
for i in range(2,n+1):
    j = 2
    while i >= 2:
        while i % j == 0:
            i = i//j
            l[j] += 1
        j += 1

ans = sum(x >= 74 for x in l)

a = sum(x >= 2 for x in l)
b = sum(x >= 24 for x in l)
ans += b*(a-1)

a = sum(x >= 4 for x in l)
b = sum(x >= 14 for x in l)
ans += b*(a-1)

a = sum(x >= 2 for x in l)
b = sum(x >= 4 for x in l)
ans += b*(b-1)*(a-2)//2

print(ans)

def num_div(n):
  p=[]
  for i in range(2,int(n**0.5)+1):
    while n%i==0:
      p.append(i)
      n//=i
  if n>1:
    p.append(n)
  return p

n=int(input())
x=[0]*(n+1)
for i in range(1,n+1):
  for j in num_div(i):
    x[j]+=1
ex2=len([i for i in x if i>1])
ex4=len([i for i in x if i>3])
ex14=len([i for i in x if i>13])
ex24=len([i for i in x if i>23])
ex74=len([i for i in x if i>73])
print(ex4*(ex4-1)//2*(ex2-2)+ex24*(ex2-1)+ex14*(ex4-1)+ex74)

from collections import Counter
def prime_factorize(n):
    i = 2
    factors = []
    while i*i <= n:
        while n%i == 0:
            n //= i
            factors.append(i)
        i += 1
    if n > 1:
        factors.append(n)
    return Counter(factors)

n = int(input())

c = Counter([])
for i in range(1, n+1):
    c += prime_factorize(i)

"""
75 = 3 * 5 * 5
75数 = {p,q,r|p,q,rは互いに素}として
 p^2 * q^4 * r^4
 p^2 * q^24
 p^4 * q^14
 p^74
"""
ans = 0
s = set([i for i,cnt in c.items() if cnt >= 4])
t = set([i for i,cnt in c.items() if cnt >= 2])
ls = len(s)
lt = len(t)
if ls >= 2:
    ans += ls * (ls - 1) // 2 * (lt - 2)

s = set([i for i,cnt in c.items() if cnt >= 24])
t = set([i for i,cnt in c.items() if cnt >= 2])
ls = len(s)
lt = len(t)
if ls >= 1:
    ans += ls * (lt - 1)

s = set([i for i,cnt in c.items() if cnt >= 14])
t = set([i for i,cnt in c.items() if cnt >= 4])
ls = len(s)
lt = len(t)
if ls >= 1:
    ans += ls * (lt - 1)

s = set([i for i,cnt in c.items() if cnt >= 74])
ls = len(s)
ans += ls

print(ans)

N = int(input())
c = (N+1)*[0]

for i in range(2,N+1):
  j = 2
  while j*j<=i:
    while i%j==0:
      c[j]+=1
      i//=j
    j+=1
  if 1<i:
    c[i]+=1

f = lambda x:sum(y+1>=x for y in c)
print(f(75)+f(25)*(f(3)-1)+f(15)*(f(5)-1)+f(5)*(f(5)-1)//2*(f(3)-2))

import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def primeFactorization(n):
    ans = []
    temp = n
    while temp%2 == 0:
        ans.append(2)
        temp //= 2
    for i in range(3, int(n**0.5)+1, 2):
        while temp%i == 0:
            ans.append(i)
            temp //= i
    if temp > 1:
        ans.append(temp)
    return collections.Counter(ans)

def resolve():
    N = I()

    # N!の素因数を求める
    pf_N_fact = collections.Counter()
    for i in range(1, N + 1):
        pf = primeFactorization(i)
        for k, v in list(pf.items()):
            pf_N_fact[k] += v
    l = list(pf_N_fact.values())
    l.sort()
    pf_num = len(pf_N_fact)

    # 約数75個: 素因数の個数+1の積が75になるように組み合わせる
    # 素因数の個数を以下の組み合わせで何通り取れるかを調べる
    # (2, 4, 4), (2, 24), (4, 14), (74)
    ans = 0
    num_2 = pf_num - bisect.bisect_left(l, 2)
    num_4 = pf_num - bisect.bisect_left(l, 4)
    num_14 = pf_num - bisect.bisect_left(l, 14)
    num_24 = pf_num - bisect.bisect_left(l, 24)
    num_74 = pf_num - bisect.bisect_left(l, 74)
    ans += num_4 * (num_4 - 1) // 2 * max(num_2 - 2, 0)
    ans += num_24 * max(num_2 - 1, 0)
    ans += num_14 * max(num_4 - 1, 0)
    ans += num_74
    print(ans)

def __starting_point():
    resolve()

__starting_point()

from collections import Counter, defaultdict

N = int(input())

def primeFactorization(N):
    primes = Counter()
    R = int(N**(0.5)) + 1
    for num in range(2, R):
        while N % num == 0:
            N //= num
            primes[num] += 1
    if N > 1 :
        primes[N] = 1
    return primes

primes = Counter()
for i in range(1, N + 1):
    primes += primeFactorization(i)

cnt = defaultdict(int)
for c in list(primes.values()):
    c += 1
    for d in (3, 5, 15, 25, 75):
        if c >= d:
            cnt[d] += 1

ans = 0
ans += cnt[5] * (cnt[5] - 1) * (cnt[3] - 2) // 2
ans += cnt[25] * (cnt[3] - 1)
ans += cnt[15] * (cnt[5] - 1)
ans += cnt[75]
print(ans)


from collections import defaultdict
primes = list(range(2,101))
for i in range(len(primes)):
    if primes[i]:
        j = i
        j += primes[i]
        while j < len(primes):
            primes[j] = None
            j += primes[i]
primes = [p for p in primes if p]
N = int(input())
fact = defaultdict(int)
for p in primes:
    i = p
    while i <= N:
        fact[p] += N//i
        i *= p
f2 = set()
f4 = set()
f14 = set()
f24 = set()
f74 = set()
for p in fact:
    if fact[p] >= 2:
        f2.add(p)
    if fact[p] >= 4:
        f4.add(p)
    if fact[p] >= 14:
        f14.add(p)
    if fact[p] >= 24:
        f24.add(p)
    if fact[p] >= 74:
        f74.add(p)
ans = 0
ans += len(f74)
ans += len(f24)*(len(f2)-1)
ans += len(f14)*(len(f4)-1)
ans += (len(f2)-2)*len(f4)*(len(f4)-1)//2
print(ans)

N=int(input())



from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1,r + 1)))
    return over // under


from collections import defaultdict
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

count=1
D=defaultdict(int)
for i in range(1,N+1):
    f=factorization(i)
    for t in f:
        num,con=t
        D[num]+=con
threes=0
fives=0
num_15=0
num_25=0
num_75=0

for v in list(D.values()):
    if v>=2:
        threes+=1
    if v>=4:
        fives+=1
    if v>=14:
        num_15+=1
    if v>=24:
        num_25+=1
    if v>=74:
        num_75+=1
#3*5*5
ans=(threes-fives)*fives*(fives-1)//2
if fives>=3:
    #ans+=cmb(fives, 3)
    ans+=fives*(fives-1)*(fives-2)//2
#75*1

ans+=num_75
#5*15

ans+=num_15*(fives-1)
#3*25
ans+=num_25*(threes-1)
print(ans)
#print(D)
#print(threes, fives, num_15, num_25, num_75)
#print(factorization(32400))


N = int(input())
e = [0]*(N+1)
for i in range(2,N+1):
    cur = i
    for j in range(2,i+1):
        while cur%j==0:
            e[j] += 1
            cur //=j
def num(m):
    return len(list(filter(lambda x:x>=m-1,e)))
print(num(75) + num(25)*(num(3)-1) + num(15)*(num(5)-1) + num(5)*(num(5)-1)*(num(3)-2)//2)

##昨日やった...
import numpy as np

def prime_factorize(N): #素因数分解
    exponent = 0
    while N%2 == 0:
        exponent += 1
        N //= 2
    if exponent: factorization = [[2,exponent]]
    else: factorization = []
    i=1
    while i*i <=N:
        i += 2
        if N%i: continue
        exponent = 0
        while N%i == 0:
            exponent += 1
            N //= i
        factorization.append([i,exponent])
    if N!= 1: factorization.append([N,1])
    assert N != 0, "zero"
    return factorization

factors = [0]*100
N = int(input())

for i in range(1,N+1):
    for p,n in prime_factorize(i):
        factors[p] += n

factors = np.array(factors)
ov2 = len(factors[factors >= 2])
ov4 = len(factors[factors >= 4])
ov14 = len(factors[factors >= 14])
ov24 = len(factors[factors >= 24])
ov74 = len(factors[factors >= 74])
ans = 0
## 2*4*4
ans += (ov4-2)*(ov4)*(ov4-1)//2 + (ov2-ov4)*(ov4)*(ov4-1)//2

## 14 * 4
ans += (ov4-ov14)*(ov14) + (ov14)*(ov14-1)

## 24 * 2
ans += (ov2-ov24)*ov24 + (ov24)*(ov24-1)

## 74
ans += ov74

print(ans)

import collections
    
n = int(input())

def division(n):
    if n < 2:
        return []
    
    prime_factors = []
    
    for i in range(2,int(n**0.5)+1):
        while n % i == 0:
            prime_factors.append(i)
            n //= i
    if n > 1:
        prime_factors.append(n)
        
    return prime_factors

num = []

for i in range(1,n+1):
    div = division(i)
    num.extend(div)
c = collections.Counter(num)

div_num = 1

n2, n4, n14, n24, n74 = 0,0,0,0,0

for k,v in c.items():
    if 2<=v:
        n2 += 1
    if 4<=v:
        n4 += 1
    if 14<=v:
        n14 += 1
    if 24<=v:
        n24 += 1
    if 74<=v:
        n74 += 1

ans = n74 + n24*(n2-1) + n14*(n4-1) + n4*(n4-1)*(n2-2)//2

print(ans)

from collections import Counter
from itertools import combinations, permutations


def factor(n):
    res = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            res.append(i)
            n //= i
    if n > 1:
        return res + [n]
    else:
        return res


N = int(input())
if N < 10:
    print((0))
    return

cnt = Counter()
for i in range(2, N + 1):
    primes = factor(i)
    cnt += Counter(primes)

ans = 0
for x, y in combinations(cnt, 2):
    if cnt[x] < 4 or cnt[y] < 4:
        continue
    for z in cnt:
        if z == x or z == y or cnt[z] < 2:
            continue
        ans += 1

for x, y in permutations(cnt, 2):
    if cnt[x] >= 14 and cnt[y] >= 4:
        ans += 1

for x, y in permutations(cnt, 2):
    if cnt[x] >= 24 and cnt[y] >= 2:
        ans += 1

for x in cnt:
    if cnt[x] >= 74:
        ans += 1

print(ans)


n = int(input())

if n < 10:
    print((0))
    return

prime = [2, 3]
for i in range(5, n+1, 2):
    for p in prime:
        if i % p == 0:
            break
    else:
        prime.append(i)

# factrization
num = []
for p in prime:
    cnt = 1
    now = p
    while now <= n:
        cnt += n // now
        now *= p
    num.append(cnt)

more3 = [i for i in num if i >= 3]
more5 = [i for i in more3 if i >= 5]
more15 = [i for i in more5 if i >= 15]
more25 = [i for i in more15 if i >= 25]
more75 = [i for i in more25 if i >= 75]

more3 = len(more3); more5 = len(more5); more15 = len(more15); more25 = len(more25); more75 = len(more75)

print((more25 * (more3 - 1) + more15 * (more5 - 1) + more5 * (more5 - 1) * (more3 - 2) // 2 + more75))


# エラトステネスの篩
def make_prime_table(n):
    sieve = list(range(n + 1))
    sieve[0] = -1
    sieve[1] = -1
    for i in range(2, int(n ** 0.5) + 1):
        if sieve[i] != i:
            continue
        for j in range(i * i, n + 1, i):
            if sieve[j] == j:
                sieve[j] = i
    return sieve


def prime_factorize(n):
    result = []
    while n != 1:
        p = prime_table[n]
        c = 0
        while n % p == 0:
            n //= p
            c += 1
        result.append((p, c))
    return result


N = int(input())

prime_table = make_prime_table(100)

d = {}
for i in range(2, N + 1):
    for p, c in prime_factorize(i):
        d.setdefault(p, 0)
        d[p] += c

# 75 = 5 * 5 * 3
#    = 15 * 5
#    = 25 * 3
#    = 75
n74 = 0
n24 = 0
n14 = 0
n4 = 0
n2 = 0
for k in d:
    if d[k] >= 74:
        n74 += 1
    if d[k] >= 24:
        n24 += 1
    if d[k] >= 14:
        n14 += 1
    if d[k] >= 4:
        n4 += 1
    if d[k] >= 2:
        n2 += 1

result = 0
# x ^ 4 * y ^ 4 * z ^ 2 の約数の個数は75個
result += n4 * (n4 - 1) // 2 * (n2 - 2)
# x ^ 14 * y ^ 4 の約数の個数は75個
result += n14 * (n4 - 1)
# x ^ 24 * y ^ 2 の約数の個数は75個
result += n24 * (n2 - 1)
# x ^ 74 の約数の個数は75個
result += n74
print(result)


P = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
S = [0]*25

N = int(input())
for i in range(2, N+1):
    num = i
    j = 0
    while num > 1:
        if num%P[j] == 0:
            num //= P[j]
            S[j] += 1
        else:
            j += 1
            if j == 25:
                break

# 74
# 2 24
# 4 14
# 2 4 4

ans = 0
if S[0] >= 74:
    ans += 1
for i in range(3):
    if S[i] >= 24:
        tmp = -1
        for num in S:
            if num >= 2:
                tmp += 1
        ans += tmp
for i in range(4):
    if S[i] >= 14:
        tmp = -1
        for num in S:
            if num >= 4:
                tmp += 1
        ans += tmp
tmp4 = 0
tmp2 = 0
for num in S:
    if num >= 4:
        tmp4 += 1
    if num >= 2 and num < 4:
        tmp2 += 1
ans += tmp4*(tmp4-1)*(tmp4+tmp2-2)//2
print(ans)

from collections import Counter
from math import factorial

def prime_factorize(n):
    a = []
    while n%2 == 0:
        a.append(2)
        n //=2
    f = 3
    while f*f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def prime_factoring(n):
    from collections import Counter
    a = prime_factorize(n)
    return Counter(a)

N = int(input())
fac =factorial(N)
List = list(prime_factoring(fac).values())
# print(List)

def num(m):
    return len(list([x for x in List if x >= m-1]))
print((num(75)+ num(25)*(num(3)-1) + num(15)*(num(5)-1)+ num(5)*(num(5)-1)*(num(3)- 2)//2))