Even if the world is full of counterfeits, I still regard it as wonderful.

Pile up herbs and incense, and arise again from the flames and ashes of its predecessor — as is known to many, the phoenix does it like this.

The phoenix has a rather long lifespan, and reincarnates itself once every a! years. Here a! denotes the factorial of integer a, that is, a! = 1 × 2 × ... × a. Specifically, 0! = 1.

Koyomi doesn't care much about this, but before he gets into another mess with oddities, he is interested in the number of times the phoenix will reincarnate in a timespan of b! years, that is, [Image]. Note that when b ≥ a this value is always integer.

As the answer can be quite large, it would be enough for Koyomi just to know the last digit of the answer in decimal representation. And you're here to provide Koyomi with this knowledge.


-----Input-----

The first and only line of input contains two space-separated integers a and b (0 ≤ a ≤ b ≤ 10^18).


-----Output-----

Output one line containing a single decimal digit — the last digit of the value that interests Koyomi.


-----Examples-----
Input
2 4

Output
2

Input
0 10

Output
0

Input
107 109

Output
2



-----Note-----

In the first example, the last digit of $\frac{4 !}{2 !} = 12$ is 2;

In the second example, the last digit of $\frac{10 !}{0 !} = 3628800$ is 0;

In the third example, the last digit of $\frac{109 !}{107 !} = 11772$ is 2.

Difficulty: interview

Starter code:

Solutions:
a, b = map(int, input().split())

if b - a > 10:
	print(0)
else:
	s = 1
	for i in range(a + 1, b + 1):
		s *= i
	print(str(s)[-1])

a,b = map(int,input().split())
if(b-a >= 5):
	print(0)
else:
	ans = 1
	for i in range(a+1,b+1):
		ans *= (i%10)
	print(ans%10)

def __starting_point():
    arr = input().split(' ')
    ans = 1
    a = int(arr[0])
    b = int(arr[1])
    while ans!=0 and b>a:
        ans = (b%10)*ans
        ans = ans%10
        b -= 1
    print(ans)

__starting_point()

a, b = list(map(int, input().split()))
if b >= a + 10:
	print(0)
else:
	cnt = 1
	for i in range(a + 1, b + 1):
		#print (i)
		cnt *= i
		cnt %= 10
	print (cnt)


import random, math
a, b = map(int, input().split())
r = 1
if b > a + 6:
	print(0)
else:
	for i in range(a + 1, b + 1):
		r *= i % 10
	print(r % 10)

a, b = map(int, input().split())
if (b - a > 10):
    print(0);
else:
    ans = 1
    for i in range(a + 1, b + 1):
        ans *= i;
    print(ans % 10);

a, b = map(int, input().split())
if b - a > 10:
    print(0)
else:
    mul = 1
    for i in range(a + 1, b + 1):
        mul *= i
    print(mul % 10)

a, b = map(int, input().split())
if b - a < 10:
    c = 1
    for i in range(a + 1, b + 1):
        c *= i
    print(c % 10)
else:
    print(0)

a, b = list(map(int, input().split()))
if b - a > 12:
    print(0)
else:
    res = 1
    for i in range(a + 1, b + 1):
        res *= i
    print(res % 10)


A, B = map(int, input().split())

i = A + 1
ans = 1

while i <= B:
	ans = ans * (i % 10)
	ans = ans % 10
	if (ans % 10) == 0:
		break
	i = i + 1

print(ans) 

a, b = [int(i) for i in input().split()]
a = max(a, 1)
b = max(b, 1)
pr = 1
for i in range(a + 1, b + 1):
    pr = pr * i
    pr = pr % 10
    if pr == 0:
        break
print(pr)

a,b=list(map(int,input().split()))
c=1
for i in range(b-a):
    z=(a + i + 1) % 10
    c*=z
    c=c%10
    if c==0:
        break
    
print(c)


a,b = list(map(int,input().split()))
if b-a>=5:
    print(0)
else:
    b = b%10
    a = a%10
    if b<a:
        b+=10
    p = 1
    for i in range(1,b-a+1):
        p *= (a+i)
    print(p%10)



import math
import re
def ria():
    return [int(i) for i in input().split()]
a,b=ria()
c=b-a
if c>=20:
    print(0)
else:
    kek=1
    
    for i in range(a+1,b+1):
        kek*=i

    print(kek%10)


a,b=list(map(int,input().split()))

the=1
for i in range(a+1,min(b,a+10)+1):
	the*=i

print(the%10)


a, b = list(map(int, input().split()))
if ((b - a) >= 10):
    print(0)
else:
    k = 1
    for i in range(a + 1, b + 1):
        k *= i
    print(k % 10)


import math

r,n=map(int,input().split())

if n-r>=5:
	print(0)
else:
	ans=1
	for i in range(r+1,n+1):
		ans*=i
	print(ans%10)

a, b = list(map(int, input().split()))
ans = 1
for i in range(a+1, b+1):
    ans*= i
    if ans%10 == 0:
        break
print(ans%10)



a, b = map(int, input().split())
if b >= a + 10:
    print(0)
else:
    ans = 1
    for i in range(a + 1, b + 1):
        ans *= i
    print(ans % 10)

a, b = map(int, input().split())

if (b - a) >= 5:
    print(0)
else:
    s = 1
    for i in range(a + 1, b + 1):
        s = ((i % 10) * s) % 10
    print(s % 10)

a,b=list(map(int,input().split()))
fact=1
if(b-a<5):
	for i in range(a+1,b+1):
		fact*=i
	print(fact%10)
else:
	print(0)


a, b = map(int, input().split())
d = [1, 1, 2, 6, 4]
if a==0:
    print(0 if b>=5 else d[b])
elif b==0:
    print(1 if a<=1 else 0)
else:
    f = 1
    x = a+1
    while x<=b:
        f *= x
        if x%10==0:
            break
        x += 1
    print(f%10)

a,b=list(map(int,input().split()))
if(b-a)>=5:
    print("0")
else:
    num_term=b-a
    num=1
    for i in range(num_term):
        num=num*((a+i+1)%10)
        num=num%10
    print(num)

(a,b)=list(map(int,input().split()));
if(b-a>=10):
    print((0));
    return;
else:
    x=1;
    for i in range(a+1,b+1):
        x=(x*(i%10))%10;
print(x);