Find the number of _palindromic numbers_ among the integers between A and B (inclusive). Here, a palindromic number is a positive integer whose string representation in base 10 (without leading zeros) reads the same forward and backward.
a,b = map(int,input().split())
n = 0
for i in range(a,b+1):
    c = [int(i) for c in str(i)]
    if c[0] == c[4] and c[1] == c[3]:
        n += 1
print(n)
a,b = map(int,input().split())
n = 0
for i in range(a,b+1):
    c = [int(j) for j in list(str(i))]
    if c[0] == c[4] and c[1] == c[3]:
        n += 1
print(n)