Problem:
 Score : 200 points    Problem Statement Today is August 24 , one of the five Product Days in a year.  A date m - d ( m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):   d_1 \geq 2  d_{10} \geq 2  d_1 \times d_{10} = m   Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M , and each month consists of D days from Day 1 to Day D .  In Takahashi Calendar, how many Product Days does a year have?      Constraints  All values in input are integers.  1 \leq M \leq 100  1 \leq D \leq 99         Input Input is given from Standard Input in the following format:  M  D       Output Print the number of Product Days in a year in Takahashi Calender.        Sample Input 1 15 40      Sample Output 1 10  There are 10 Product Days in a year, as follows ( m - d denotes Month m , Day d ):   4 - 22  6 - 23  6 - 32  8 - 24  9 - 33  10 - 25  12 - 26  12 - 34  14 - 27  15 - 35        Sample Input 2 12 31      Sample Output 2 5       Sample Input 3 1 1      Sample Output 3 0

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


M, D = MAP()
 
ans = 0
for i in range(1, M+1):
	for j in range(1, D+1):
		if 2 <= j//10 and 2 <= j%10 and (j//10)*(j%10) == i:
			ans += 1
 
print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


M, D = MAP()
ans = 0
for m in range(1, M+1):
	for d in range(1, D+1):
		if len(str(d)) == 2:
			d1 = int(str(d)[1])
			d10 = int(str(d)[0])
			if 2 <= d1 and 2 <= d10 and d1*d10 == m:
				ans += 1
print(ans)

Solution (Python):
M,D=[int(i) for i in input().split()]

if D<20:
  print(0)
else :
  count = 0
  for i in range(1,M+1):
    for id in list(range(20, D+1)):
      if int((str(id))[1]) >= 2 and ( int(str(id)[0]))*int((str(id))[1]) == i :
         count += 1
  print(count)

Solution (Python):
m,d=map(int,input().split())
ans=0
if d<22:
    print(ans)
    exit()
for i in range(1,m+1):
    for j in range(22,d+1):
        if int(str(j)[-1])>=2:
            if i==int(str(j)[0])*int(str(j)[-1]):
                ans+=1
print(ans)

Solution (Python):
M,D=map(int,input().split())

cnt=0
for m in range(1,M+1):
  for d in range(1,D+1):
    s=d//10
    t=d%10
    if s>=2 and t>=2 and s*t==m:
      cnt +=1
print(cnt)

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush


from functools import lru_cache


def input(): return sys.stdin.readline()[:-1]
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    
    M,D = map(int, input().split())
    
    
    
    count=0
    for m in range(1,M+1):
        for d in range(1,D+1):
            if d%10>=2 and d//10>=2 and m==(d%10)*(d//10):
                count+=1
    print(count)




if __name__ == "__main__":
    main()

Solution (Python):
m,d=map(int,input().split())

ans=0
for i in range(1,m+1):
    for j in range(22,d+1):
        if int(str(j)[1])>=2 and int(str(j)[0])*int(str(j)[1])==i:
            ans+=1
            
print(ans)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


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


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




M,D = IL()
ans =0
def kake(n):
  if n%10 < 2 or n//10 < 2:
    return 0
  return (n%10)*(n//10)
for i in range(1,M+1):
  for d in range(1,D+1):
    if i==kake(d):
      ans += 1
print(ans)

Solution (Python):
M,D = map(int, input().split())
ans = 0
for i in range(1,M+1):
  for j in range(2, D//10 + 1):
    for k in range(2, 10):
      if j*10 + k > D:
        break
      else:
        if j*k == i:
          ans += 1
print(ans)

Solution (Python):
def jsc19q_a():
    M, D = map(int, input().split())
    ans = 0
    for m in range(1, M+1):
        for d in range(1, D+1):
            d1 = d % 10
            d //= 10
            d2 = d % 10
            if d1 < 2 or d2 < 2: continue
            if d1 * d2 == m: ans += 1
    print(ans)

jsc19q_a()

Solution (Python):
if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    count = 0

    for i in range(2,a[0]+1):
        for j in range(2,a[1]+1):
            if j > 9:
                k = str(j)
                if i == int(k[0])*int(k[1]) and int(k[0]) > 1 and int(k[1]) >1:
                    count+=1

    print(count)

Solution (Python):


m, d = map(int,input().split())

ans = 0
for i in range(1,m+1):
    for j in range(1,d+1):
        if len(str(j)) == 2:
            d1 = int(str(j)[0])
            d10 = int(str(j)[1])
            if i >= 2 and d1 >= 2 and d10 >= 2 and int(str(j)[0]) * int(str(j)[1]) == i:
                ans += 1

print(ans)

Solution (Python):
m, d = map(int,input().split())
ans = 0

for i in range(1,m+1):
    for j in range(1,d+1):
        x = j//10
        y = j%10 
        if x >= 2 and y >= 2 and x*y==i:
            ans += 1

print(ans)

Solution (Python):
m,d = map(int,input().split())

point = 0

for i in range(1,m+1):
    for j in range(10,d+1):
        s = str(j)
        one = int(s[0])
        two = int(s[1])
        if one >= 2 and two >= 2 and one*two == i:
            point += 1

print(point)

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)

mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m,d = readInts()
cnt = 0
for i in range(22,d+1):
    for p in range(1, m+1):
        if i // 10 >= 2 and i % 10 >= 2:
            if p == (i//10) * (i % 10):
                cnt += 1
print(cnt)

Solution (Python):
M, D = input().split()
M = int(M)
d10 = int(D[0])
if len(D) >1:
  d1 = int(D[1])
ans = 0
for i in range(2,d10+1):
  for j in range(2,10):
    if i == d10 and j<=d1 and i*j <= M:
      ans += 1
     
    elif i*j <= M and i<d10:
      ans += 1
      
print(ans)

Solution (Python):
M, D = map(int, input().split())
ans=0
for m in range(1,M+1,1):
  for d in range(22,D+1,1):
    d1=d%10
    d10=d//10
    if d1>1 and d10>1:
      if m==d1*d10:
        ans+=1
        
print(ans)

Solution (Python):
def is_the_day(m,d):
    return d >= 22 and (d%10) >= 2 and (d//10) >= 2 and (d%10)*(d//10) == m

M,D = map(int,input().split())

ans = 0

for m in range(1,M+1):
    for d in range(1,D+1):
        ans += int(is_the_day(m,d))

print(ans)

Solution (Python):
m,d=map(int,input().split())
ans=0
for i in range(1,m+1):
  for j in range(10,d+1):
    if i==(j//10)*(j%10) and j//10>1 and j%10>1:ans+=1
print(ans)

Solution (Python):
M,D = map(int,input().split())
cnt = 0
for i in range(22,D+1):
    d = str(i)
    if int(d[1])>=2 and int(d[1])*int(d[0])<=M:
        cnt += 1
print(cnt)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for i in range(1, M + 1):
    for j in range(1, D + 1):
        d1, d10 = str(j).zfill(2)
        if int(d1) > 1 and int(d10) > 1 and i == int(d1) * int(d10):
            ans += 1
print(ans)

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()

m, d = map(int, input().split())
ans = 0
for i in range(1, m + 1):
    for j in range(1, d + 1):
        if len(str(j)) >= 2 and int(str(j)[0]) >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0])*int(str(j)[1]) == i:
            
            ans += 1
print(ans)

Solution (Python):
m,d = map(int, input().split())

ans = 0
for i in range(1,m+1):
    for d1 in range(2,10):
        if i % d1 == 0:
            d10 = i // d1
            if 2 <= d10 <= 9 and 10 * d10 + d1 <= d: ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())

ans = 0

if D < 22:
    print(0)
    exit()

for m in range(1, M+1):
    for d in range(22, D+1):
        d1, d10 = d%10, d//10
        ans += (d1 >= 2 and d10 >= 2 and d1 * d10 == m)

print(ans)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        if d <= 9:
            continue
        d = str(d)
        d1 = int(d[0])
        d2 = int(d[1])
        if d1 >= 2 and d2 >= 2 and m == d1*d2:
            
            ans += 1
print(ans)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

M, D = MAP()
ans = 0
for m in range(1, M+1):
	for d in range(1, D+1):
		if len(str(d)) == 2:
			d1 = int(str(d)[1])
			d10 = int(str(d)[0])
			if d1 >= 2 and d10 >= 2 and d1*d10 == m:
				ans += 1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
from collections import *

M, D = map(int, input().split())
ans = 0

for i in range(1, M+1):
    for j in range(10, D+1):
        d0 = int(str(j)[0])
        d1 = int(str(j)[1])
        
        if d0>=2 and d1>=2 and i==d0*d1:
            ans += 1

print(ans)

Solution (Python):
M,D= list(map(int,input().split()))
ans=0
if D < 10:
   print(0)
   exit()
for i in range(1,M+1):
   for j in range(10,D+1):
      s=str(j)
      if i == int(s[0])*int(s[1]) and int(s[0])>=2 and int(s[1])>=2:
         ans+=1
print(ans)

Solution (Python):
M,D = map(int,input().split())

ans = 0
for m in range(M+1):
    for d in range(10,D+1):
        d1,d2 = d // 10,d % 10
        if m == d1 * d2 and d1 >= 2 and d2 >= 2:
            ans += 1

print(ans)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

m, d = na()

cur_m = 1
cur_d = 1
ans = 0
while cur_m // (m + 1) != 1:
    while cur_d // (d + 1) != 1:
        if cur_d % 10 >= 2 and cur_d // 10 >= 2:
            ans += ((cur_d % 10) * (cur_d // 10)) == cur_m
        cur_d += 1
    cur_d = 1
    cur_m += 1

print(ans)

Solution (Python):
m,d=map(int,input().split())
ans=0
for i in range(1,m+1):
    for j in range(1,d+1):
        d10=j//10
        d1=j%10
        if d1>1 and d10>1 and d10*d1==i:
            ans+=1
print(ans)

Solution (Python):
import heapq
from sys import stdin
input = stdin.readline




m,d = map(int, input().split())










     
def main():
    ans = 0
    for i in range(1,m+1):
        for j in range(20,d+1):
            d10 = j//10
            d1 = j%10
            if d10 ==1 or d1 ==1:
                continue
            if d10*d1 == i:
                ans+=1
    print(ans)
    
    

if __name__ == '__main__':
    main()

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m,d = readInts()
cnt = 0
for i in range(22,d+1):
    
    for p in range(1,m+1):
        
        if i//10 >= 2 and i %10 >= 2:
            if p == (i//10) * (i%10):
                
                cnt += 1
print(cnt)

Solution (Python):
m, d = map(int, input().split())


def is_seki(m, d1, d10):
    if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
        return 1
    else:
        return 0

total = 0
for month in range(1, m+1):
    for day in range(1, d+1):
        day = str(day)
        if len(day) == 2:
            d1 = int(day[0])
            d10 = int(day[1])
        else:
            d1 = 0
            d10 = int(day)
        total += is_seki(month, d1, d10)

print(total)

Solution (Python):
M, D = map(int, input().split())

ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d10, d1 = divmod(d, 10)
        if d10 >= 2 and d1 >= 2 and d10 * d1 == m:
            ans += 1
print(ans)

Solution (Python):
m,d = map(int,input().split())
ans = 0
for i in range(1,d+1):
  a = i%10
  b = i//10
  if a >= 2 and b >= 2 and a*b <= m:
    ans += 1
print(ans)

Solution (Python):
m, d = map(int, input().split())

ans = 0
for mi in range(1, m + 1):
    for di in range(1, d + 1):
        d10, d1 = divmod(di, 10)
        if d1 >= 2 and d10 >= 2 and mi == d10 * d1:
            ans += 1

print(ans)

Solution (Python):
M,D=map(int,input().split())
count=0
for month in range(1,M+1):
    for day in range(1,D+1):
        d1=day%10
        d10=day//10
        if d1>=2 and d10>=2 and d1*d10==month:
            count+=1
print(count)

Solution (Python):
m,d = map(int,input().split())
ans = 0
for i in range(1,m+1):
    for j in range(10,d+1):
        d1 = j%10
        d2 = j//10
        if d1 >= 2 and d2 >= 2 and d1*d2 == i:
            ans += 1
print(ans)

Solution (Python):
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    M,D = map(int, input().split())
    cnt = 0
    for m in range(1,M+1):
        for d in range(1,D+1):
           if((d%10)*(d//10) == m and d%10 > 1 and d//10 > 1):
               cnt += 1
            

    print(cnt) 

if __name__ == '__main__':
    solve()

Solution (Python):
M, D = map(int, input().split())
def judge(m, d):
    if len(d) == 2 and m == int(d[0]) * int(d[1]) and int(d[0]) >= 2 and int(d[1]) >= 2:
        return 1
    else:
        return 0
ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        ans += judge(m, str(d))
print(ans)

Solution (Python):
M,D = list(map(int,input().split()))
count = 0
for i in range(1,M+1):
    for j in range(1,D+1):
        if len(str(j)) == 1:
            continue
        d10 = int(str(j)[0])
        d1 = int(str(j)[1])
        if d10 >= 2 and d1 >= 2 and d10*d1 == i:
            count += 1
print(count)

Solution (Python):
m, d = map(int, input().split())

ans = 0
for em in range(1, m + 1):
    for ed in range(1, d + 1):
        q, r = divmod(ed, 10)
        if q >= 2 and r >= 2 and q * r == em:
            ans += 1

print(ans)

Solution (Python):
from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

m,d = mi()

ans=0

for i in range(1,m+1):
    for j in range(1,d+1):
        if j<22:
            continue

        d1 = j%10
        d10 = j//10
        if d1>=2 and d10>=2 and d1*d10 == i:
            ans += 1
print(ans)

Solution (Python):
from sys import stdin
M, D = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        d1 = int(j%10)
        d10 = int(j/10)
        if d1 >= 2 and d10 >= 2 and d1*d10 == i:
            ans += 1
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    M, D = map(int, input().split())

    ans = 0
    for m in range(1, M + 1):
        for d in range(10, D + 1):
            d_10 = d // 10
            d_1 = d % 10
            if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == m:
                ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(1, m+1):
    for j in range(1, d+1):
        d1 = j%10
        d10 = (j//10)%10
        if d1 < 2 or d10 < 2: continue
        if d1*d10 == i: ans+=1
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    m,d=map(int,input().split())
    cnt=0
    for i in range(10,d+1):
        if int(str(i)[0])>=2 and int(str(i)[1])>=2 and 1<=int(str(i)[0])*int(str(i)[1])<=m:
            cnt+=1
    print(cnt)
        
    
resolve()

Solution (Python):
M, D = map(int, input().split())
ans = 0
for i in range(1, M+1):
  for j in range(10, D+1):
    d1 = j%10
    d10 = j//10
    if d1 >= 2 and d10 >= 2:
      if i == d1 * d10:
        ans += 1
print(ans)

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(22,d+1):
    d0, d1 = int(str(i)[0]), int(str(i)[1])
    if d0 < 2 or d1 < 2: continue
    if 1 <= d0*d1 <= m: ans += 1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    M,D=MI()
    ans=0
    for m in range(1,M+1):
        for d in range(1,D+1):
            d1=d%10
            d2=d//10
            
            if d1>=2 and d2>=2:
                if m==d1*d2:
                    ans+=1
                    
    print(ans)
                

main()

Solution (Python):
m,d = map(int, input().split())
ans = 0



for i in range(m):
    i += 1
    for j in range(d):
        j += 1
        if j >= 22:
            r = str(j)
            a = int(r[0])
            b = int(r[1])
            if a >= 2 and b >= 2 and a*b == i:
                ans += 1

print(ans)

Solution (Python):
m,d = map(int, input().split())
ans = 0

for i in range(1,m+1):
    for d1 in range(2,10):
        if i % d1 == 0:
            d10 = i // d1
            if 2 <= d10 <= 9 and 10 * d10 + d1 <= d:
              ans += 1
print(ans)

Solution (Python):
M,D = map(int,input().split())

c = 0

for m in range(1,M+1):
    for d in range(20,D+1):
        if(d%10 >= 2):
            if(m == (d//10)*(d%10)):c += 1
print(c)

Solution (Python):
m,d = map(int, input().split())

ans = 0
for i in range(1,m+1):
    for d1 in range(2,10):
        if i % d1 == 0:
            d10 = i // d1
            if 2 <= d10 <= 9 and 10 * d10 + d1 <= d: ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())

ans = 0
for m in range(1, M+1):
  for d1 in range(2, 10):
    if m % d1 == 0:
      d10 = m // d1
      if 2 <= d10 <= 9 and 10*d10 + d1 <= D:
        ans += 1

print(ans)

Solution (Python):
def resolve():
    m,d=map(int, input().split())
    cnt=0
    for i in range(1,m+1):
        for j in range(22,d+1):
            if j//10>=2 and j%10>=2 and i==(j//10)*(j%10):
                cnt+=1
    print(cnt)
resolve()

Solution (Python):
def resolve():
    m,d=map(int, input().split())
    cnt=0
    for i in range(1,m+1):
        for j in range(22,d+1):
            jstr=str(j)
            j10=int(jstr[0])
            j1=int(jstr[1])
            if j1>=2 and j10>=2 and i==j1*j10:
                cnt+=1
    print(cnt)
resolve()

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(22, d + 1):
    a = i // 10
    b = i % 10
    if b < 2:
        continue
    if a * b <= m:
        ans += 1
print(ans)

Solution (Python):
m, d = list(map(int, input().split()))
ans = 0
for mm in range(1, m+1):
    for dd in range(1, d+1):
        if dd % 10 >= 2 and dd//10 >= 2 and mm == (dd % 10)*(dd//10):
            ans += 1


print(ans)

Solution (Python):
m,d = map(int, input().split())
res = 0
for i in range(1,m+1):
  for j in range(1,d+1):
    if j >= 22 and j % 10 >= 2 and int(str(j)[0]) * int(str(j)[1]) == i:
      res += 1
print(res)

Solution (Python):
M, D = map(int, input().split())
ans = 0

for m in range(1, M + 1):
    for d in range(1, D + 1):
        d1 = d // 10
        d2 = d % 10
        if d1 >= 2 and d2 >= 2 and m == d1 * d2:
            ans += 1
print(ans)

Solution (Python):
m, d = map(int, input().split())
print(sum(i%10 * m > m >= i//10*(i%10) for i in range(22, d+1)))

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    m,d = map(int, input().split())
    res = 0
    for i in range(1, m+1):
        for j in range(1, d+1):
            a = j // 10
            b = j % 10
            if a>=2 and b>=2:
                if a*b == i:
                    res += 1
    print(res)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

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


def resolve():
    m, d = map(int, input().split())

    res = 0
    for i in range(4, m + 1):
        for j in range(22, d + 1):
            d1, d10 = divmod(j, 10)
            if i == d1 * d10 and d1 >= 2 and d10 >= 2:
                res += 1

    print(res)


if __name__ == '__main__':
    resolve()

Solution (Python):
m,d=map(int,input().split())
ans=0
for i in range(1,m+1):
    for j in range(20,d+1):
        x=str(j)
        if int(x[1])>=2:
            if int(x[0])*int(x[1])==i:
                ans+=1
print(ans)

Solution (Python):
m, d = map(int, input().split())
cnt = 0
for i in range(1, m+1):
    for j in range(20, d+1):
        tenth = j // 10
        oneth = j % 10
        if oneth >= 2 and i == tenth * oneth:
            cnt +=1
        else:
            pass
print(cnt)

Solution (Python):
M, D = map(int, input().split())

ans = 0
for i in range(4, M+1):
    for j in range(22, D+1):
        d1 = j % 10
        d2 = j // 10
        if d1 >= 2 and d2 >= 2 and i == d1 * d2:
            ans += 1

print(ans)

Solution (Python):
M,D = map(int, input().split())
ans = 0
for i in range(1,M+1):
    for j in range(1,D+1):
        if j>= 22:
            d = str(j)
            d1 = int(d[1])
            d10 = int(d[0])
            if d1 * d10 == i and d1 >= 2:
                
                ans += 1
print(ans)

Solution (Python):

if False:
    N=int(input())
    if N%2==0: print(N//2-1)
    else: print(N//2)


M,D=map(int,input().split())
ans=0
for m in range(1,M+1):
    for d in range(1,D+1):
        if len(str(d))==2:
            x,y=int(str(d)[0]),int(str(d)[1])
            if x>=2 and y>=2 and x*y==m:
                ans+=1
print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    m,d=map(int,input().split())
    ans=0
    for i in range(1,m+1):
        for j in range(d+1):
            d_10=j//10
            d_1=j%10
            if d_10>=2 and d_1 >=2 and i == d_10*d_1:
                ans+=1
    print(ans)

if __name__=='__main__':
    main()

Solution (Python):
M,D = map(int,input().split())
if D<=21:
    print(0)
else:
    D10 = D//10
    D1 = D%10
    cnt = 0
    for i in range(2,D10+1):
       for j in range(2,10):
           if i*10 + j > D:
               break
           if 1 <= i*j <= M:
               cnt += 1
    print(cnt)

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(1, m + 1):
    for j in range(1, d + 1):
        if(i == ((j % 10) * ((j - (j % 10)) / 10)) and (j % 10) >= 2 and ((j - (j % 10)) / 10 >= 2)):
            ans += 1
print(ans)

Solution (Python):

def calc_product(str_day):
	product = 1
	
	for d in str_day:
		if int(d) < 2:
			return 0
		else:
			product *= int(d)
		
	return product


M, D = map(int, input().split())
ans = 0

for m in range(1, M + 1):
	for d in range(22, D + 1):
		if calc_product(str(d)) == m:
			
			ans += 1

print(ans)

Solution (Python):
M, D = map(int, input().split())

ans = 0

for m in range(1, M+1):
    for d in range(1, D+1):
        if d <= 21:
            pass
        else:
            d1, d10 = int(list(str(d))[1]), int(list(str(d))[0])
            if m == d1 * d10 and d1 > 1:
                ans += 1
                
print(ans)

Solution (Python):
M, D = map(int, input().split())

ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d1 = d%10
        d2 = (d-d1)//10
        if d1>=2 and d2 >= 2 and d1*d2 == m:
            ans += 1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

cnt = 0
m,d = map(int, input().split())
for i in range(1, m+1):
        for j in range(11, d+1):
                d1 = j//10
                d2 = j%10
                if d1 * d2 == i and d1>1 and d2 > 1:
                        cnt += 1
print(cnt)

Solution (Python):
m,d=map(int,input().split())
ans=0
for i in range(d+1):
  d10=i//10
  d1=i-d10*10
  if d1!=1 and d10!=1 and d10*d1<=m and 1<=d10*d1:
    ans=ans+1
print(ans)

Solution (Python):
m,d=map(int,input().split())
ans=0
for month in range(1,m+1):
    for day in range(1,d+1):
        day=str(day)
        if len(day)!=2:
            continue
        if int(day[0])*int(day[1])!=month:
            continue
        if int(day[0])<2 or int(day[1])<2:
            continue
        
        ans+=1
print(ans)

Solution (Python):
M, D = map(int, input().split())

ans = 0

for i in range(1, M+1):
    for j in range(1, D+1):
        if len(str(j)) >= 2:
            if int(str(j)[0]) >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0]) * int(str(j)[1]) == i:
                ans += 1


print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


M, D = MI()
cnt = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        d10, d1 = divmod(d, 10)
        if d1 > 1 and d10 > 1 and d1 * d10 == m:
            cnt += 1
print(cnt)

Solution (Python):
M,D=map(int,input().split())
ans=0
for i in range(1,M+1):
    for j in range(1,D+1):
        m=i
        d=j
        s=str(d)
        if len(s)<2:
            continue
        d1=int(s[0])
        d2=int(s[1])
        if d1>1:
            if d2>1:
                if d1*d2==m:
                    ans+=1
print(ans)

Solution (Python):
M,D=map(int,input().split())
cnt=0
for i in range(22,D+1):
    if (i%10)*(i//10)<=M and i%10>=2:
        cnt+=1
print(cnt)