import java.util.*; public class Main_yukicoder189 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int MOD = 1_000_000_009; char[] m = sc.next().toCharArray(); char[] d = sc.next().toCharArray(); int nm = m.length; int nd = d.length; int[][][] dpm = new int[2][nm][10 * 200]; int[][][] dpd = new int[2][nd][10 * 200]; for (int i = nm - 1; i >= 0; i--) { for (int j = 0; j < 10; j++) { if (i == nm - 1) { dpm[0][i][j] = 1; if (j <= m[i] - '0') { dpm[1][i][j] = 1; } } else { for (int k = 0; k < 10 * 200; k++) { if (k - j >= 0) { dpm[0][i][k] = (dpm[0][i][k] + dpm[0][i + 1][k - j]) % MOD; if (j == m[i] - '0') { dpm[1][i][k] = (dpm[1][i][k] + dpm[1][i + 1][k - j]) % MOD; } else if (j < m[i] - '0') { dpm[1][i][k] = (dpm[1][i][k] + dpm[0][i + 1][k - j]) % MOD; } } } } } } for (int i = nd - 1; i >= 0; i--) { for (int j = 0; j < 10; j++) { if (i == nd - 1) { dpd[0][i][j] = 1; if (j <= d[i] - '0') { dpd[1][i][j] = 1; } } else { for (int k = 0; k < 10 * 200; k++) { if (k - j >= 0) { dpd[0][i][k] = (dpd[0][i][k] + dpd[0][i + 1][k - j]) % MOD; if (j == d[i] - '0') { dpd[1][i][k] = (dpd[1][i][k] + dpd[1][i + 1][k - j]) % MOD; } else if (j < d[i] - '0') { dpd[1][i][k] = (dpd[1][i][k] + dpd[0][i + 1][k - j]) % MOD; } } } } } } int ret = 0; for (int i = 1; i < 10 * 200; i++) { ret = (ret + (int)(((long)dpm[1][0][i] * dpd[1][0][i]) % MOD)) % MOD; } System.out.println(ret); sc.close(); } }