program main
  implicit none
  integer(8) i,M,D,ans,j
  read(*, *) M, D
  !read(*, *) (L(i), i = 1,N)
  ans = 0
  do i = 1,M
    do j = 1,D
      if (i == mod(j,10)*(j/10) .and. mod(j,10)>1 .and. j/10>1) then
        ans = ans + 1
        !write(*, *) i,j
      end if
    end do
  end do

  write(*, *) ans
end program main

; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QQcl.cd9ae61b1995cd27ef044aec3c45c30c = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3401/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.cd9ae61b1995cd27ef044aec3c45c30c, i32 4)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 8)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 8)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = load i64, ptr %2, align 8, !tbaa !3
  %8 = icmp sgt i64 %7, 0
  br i1 %8, label %.lr.ph11, label %._crit_edge12

.lr.ph11:                                         ; preds = %0
  %9 = load i64, ptr %1, align 8, !tbaa !3
  %10 = icmp sgt i64 %9, 0
  br i1 %10, label %.lr.ph.us, label %._crit_edge12

.lr.ph.us:                                        ; preds = %.lr.ph11, %._crit_edge.us
  %11 = phi i64 [ %22, %._crit_edge.us ], [ 1, %.lr.ph11 ]
  %.09.us = phi i64 [ %spec.select.us, %._crit_edge.us ], [ 0, %.lr.ph11 ]
  br label %12

12:                                               ; preds = %.lr.ph.us, %12
  %13 = phi i64 [ 1, %.lr.ph.us ], [ %21, %12 ]
  %.18.us = phi i64 [ %.09.us, %.lr.ph.us ], [ %spec.select.us, %12 ]
  %.urem = urem i64 %13, 10
  %.udiv = udiv i64 %13, 10
  %14 = mul nuw nsw i64 %.urem, %.udiv
  %15 = icmp eq i64 %11, %14
  %16 = icmp ugt i64 %.urem, 1
  %17 = and i1 %16, %15
  %18 = icmp ugt i64 %13, 19
  %19 = and i1 %18, %17
  %20 = zext i1 %19 to i64
  %spec.select.us = add i64 %.18.us, %20
  %21 = add nuw i64 %13, 1
  %exitcond.not = icmp eq i64 %13, %9
  br i1 %exitcond.not, label %._crit_edge.us, label %12

._crit_edge.us:                                   ; preds = %12
  %22 = add nuw i64 %11, 1
  %exitcond15.not = icmp eq i64 %11, %7
  br i1 %exitcond15.not, label %._crit_edge12, label %.lr.ph.us

._crit_edge12:                                    ; preds = %._crit_edge.us, %.lr.ph11, %0
  %.0.lcssa = phi i64 [ 0, %0 ], [ 0, %.lr.ph11 ], [ %spec.select.us, %._crit_edge.us ]
  %23 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.cd9ae61b1995cd27ef044aec3c45c30c, i32 16)
  %24 = call i1 @_FortranAioOutputInteger64(ptr %23, i64 %.0.lcssa)
  %25 = call i32 @_FortranAioEndIoStatement(ptr %23)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
