human
Consider a sequence of n numbers using integers from 0 to 9 k1, k2, ..., kn. Read the positive integers n and s,

k1 + 2 x k2 + 3 x k3 + ... + n x kn = s

Create a program that outputs how many rows of n numbers such as. However, the same number does not appear more than once in one "n sequence of numbers".


Input

The input consists of multiple datasets. For each dataset, n (1 ≤ n ≤ 10) and s (0 ≤ s ≤ 10,000) are given on one line, separated by blanks.

The number of datasets does not exceed 100.

Output

For each dataset, print the number of combinations in which the sum of n integers is s on one line.

Example

Input

3 10
3 1

Output

8
0
impor Give me a Python program to print the number of combinations in which the sum of n integers is s on one line?
assistant
#Here is Python program to print the number of combinations in which the sum of n integers is s on one line.
t sys

def memoize(f):
    memo = {}

    def main(*args):
        if args in memo:
            return memo[args]
        result = memo[args] = f(*args)
        return result

    return main

def get_num(remains):
    i = 0
    while remains:
        if remains & 1:
            yield i
        i += 1
        remains >>= 1

@memoize
def calc(n, s, remains):
    if n == 1:
        if remains & (1 << s):
            return 1
        else:
            return 0
    if s <= 0:
        return 0

    return sum(calc(n - 1, s - n * m, remains ^ (1 << m)) for m in get_num(remains) if s - n * m >= 0)

for line in sys.stdin:
    n, s = map(int, line.split())
    print(calc(n, s, (1 << 10) - 1))