d={}

for i in range(int(eval(input()))+1):

  for j in d:

    while i>j-1 and i%j<1: d[j]+=1; i//=j

  if i>1: d[i]=2

a=1

for v in list(d.values()): a=a*v%(10**9+7)

print(a)
d={}

for i in range(int(eval(input()))+1):

  for j in d:

    while i%j<1: d[j]+=1; i//=j

  if i>1: d[i]=2

a=1

for v in list(d.values()): a=a*v%(10**9+7)

print(a)
d = {}
for i in range(int(eval(input())) + 1):
    for j in d:
        while i > j - 1 and i % j < 1:
            d[j] += 1
            i //= j
    if i > 1:
        d[i] = 2
a = 1
for v in list(d.values()):
    a = a * v % (10**9 + 7)
print(a)

d = {}
for i in range(int(eval(input())) + 1):
    for j in d:
        while i % j < 1:
            d[j] += 1
            i //= j
    if i > 1:
        d[i] = 2
a = 1
for v in list(d.values()):
    a = a * v % (10**9 + 7)
print(a)

-        while i > j - 1 and i % j < 1: +        while i % j < 1: