$Neha$  is given a number $N$. She always looks for special thing , this time she is looking for $Special$ $Number$ and $Partial$ $Special$ $Number$. A $Special$ $Number$ is a number whose product of its digits is equal to number itself i.e. $N $, and in this number there is no digit $1$. $Partial$ $Special$ is a number having all the condition same as $Special$ except that it can also have digit $1$ in it .Neha have to count the number of $Special$ and $Partial$ $Special$ $Numbers $for a given  $N$ . She is not so good in programming , so go and help her.

-----Input:-----
- Integers $N$ is taken as input from input stream. 

-----Output:-----
- Print the number of  $Special$ and $Partial$ $Special$ $Numbers $for a given  $N$.

-----Constraints-----
- $1 \leq N \leq 100$ numbers to be count will be less then 10^6

-----Sample Input:-----
3

-----Sample Output:-----
1 20

-----EXPLANATION:-----
There are only one natural numbers, the product of the digits of which is 3  :- {3}.
There are 20 natural numbers with digit 1 , whose  product of the digits  is 3 :-{13, 31, 113 ,131 311 ,1113 ,1131 ,1311, 3111 ,11113, 11131, 11311 ,13111, 31111, 111113, 111131, 111311,113111, 131111 ,311111}

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
n = int(input())
a = []
b = []
for i in range(1, 1000001):
	s = str(i)
	p = 1
	flag = 0
	for e in s:
		if e == '1':
			flag = 1
		p = p * int(e)
	if p == n:
		if flag != 1:
			a.append(i)
		else:
			b.append(i)
print(len(a), len(b))


n = int(input())
(c1, c2) = (0, 0)
for i in range(1000001):
	j = i
	p = 1
	f = 0
	while j > 0:
		p *= j % 10
		if j % 10 == 1:
			f = 1
		j = j // 10
	if p == n:
		if f == 0:
			c1 += 1
		else:
			c2 += 1
print(c1, c2)


x = [0, 0, 1, 1, 2, 1, 3, 1, 4, 2, 2, 0, 7, 0, 2, 2, 7, 0, 7, 0, 5, 2, 0, 0, 17, 1, 0, 3, 5, 0, 8, 0, 13, 0, 0, 2, 21, 0, 0, 0, 12, 0, 8, 0, 0, 5, 0, 0, 38, 1, 3, 0, 0, 0, 15, 0, 12, 0, 0, 0, 24, 0, 0, 5, 24, 0, 0, 0, 0, 0, 6, 0, 58, 0, 0, 3, 0, 0, 0, 0, 26, 5, 0, 0, 24, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 82, 0, 3, 0, 9]
y = [0, 6, 20, 20, 54, 20, 88, 20, 122, 54, 68, 0, 238, 0, 68, 68, 224, 0, 238, 0, 170, 68, 0, 0, 522, 34, 0, 102, 170, 0, 272, 0, 358, 0, 0, 68, 630, 0, 0, 0, 352, 0, 272, 0, 0, 170, 0, 0, 928, 34, 102, 0, 0, 0, 454, 0, 352, 0, 0, 0, 648, 0, 0, 170, 502, 0, 0, 0, 0, 0, 204, 0, 1300, 0, 0, 102, 0, 0, 0, 0, 576, 156, 0, 0, 648, 0, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 1380, 0, 102, 0, 222]
n = int(input())
print(x[n], y[n])


def digitp(s, p):
	for i in range(len(s)):
		p *= int(s[i])
	return p
n = int(input())
cs = 0
cps = 0
for i in range(1, 10 ** 6 + 1):
	s = str(i)
	if digitp(s, 1) == n:
		if '1' in s:
			cps += 1
		else:
			cs += 1
print(cs, cps)


n = int(input())
(s, p) = (0, 0)
for i in range(10 ** 6):
	x = list(str(i))
	m = 1
	for j in x:
		if m == 0:
			break
		m *= int(j)
	if m == n:
		if '1' in x:
			p += 1
		else:
			s += 1
print(s, p)


n = int(input())

def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product
c = 0
cp = 0
for i in range(1, 1000000):
	count = 0
	s = str(i)
	for j in s:
		if j == '1':
			count += 1
	if count > 0 and getProduct(i) == n:
		cp += 1
	elif count == 0 and getProduct(i) == n:
		c += 1
print(c, cp)


import sys
from collections import deque
from math import ceil, sqrt, gcd, factorial
from bisect import bisect_right, bisect_left
mod = 1000000007
INF = 10 ** 18
NINF = -INF

def I():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def modi(x):
	return pow(x, mod - 2, mod)

def lcm(x, y):
	return x * y // gcd(x, y)

def write(l):
	for i in l:
		print(i, end=' ')
	print()
n = int(input())
ans = out = 0
for i in range(1, 1000000):
	p = 1
	pres = 0
	while i != 0:
		digit = i % 10
		if digit == 1:
			pres = 1
		p *= digit
		i = i // 10
	if p == n and pres == 0:
		ans += 1
	if p == n and pres == 1:
		out += 1
print(ans, out)


n = int(input().lstrip())
sn = 0
psn = 0
for i in range(1, 1000000):
	prod = 1
	for j in str(i):
		prod *= int(j)
	if prod == n:
		if '1' in str(i):
			psn += 1
		else:
			sn += 1
print(sn, psn)


def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product
special = 0
partially = 0
n = int(input())
for i in range(1, 10 ** 6 + 1):
	if getProduct(i) == n:
		str_i = str(i)
		if str_i.count('1') > 0:
			partially += 1
		else:
			special += 1
print(special, partially)


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
n = inp()
(a, b) = (0, 0)
from functools import reduce
cal = lambda i: reduce(lambda x, y: x * y, map(int, i))
for i in range(1, 10 ** 6 + 1):
	t = str(i)
	if '0' not in t:
		if cal(t) == n:
			if '1' in t:
				b += 1
			else:
				a += 1
print(a, b)


N = int(input())
(sp, psp) = (0, 0)
for i in range(1, 10 ** 6 + 1):
	l = [int(j) for j in str(i)]
	prod = 1
	for k in l:
		prod *= k
	if prod == N and '1' not in str(i):
		sp += 1
	elif prod == N and '1' in str(i):
		psp += 1
print(sp, psp)