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 ≤ 1018).

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 <image> is 2;

In the second example, the last digit of <image> is 0;

In the third example, the last digit of <image> is 2.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Main2 {

    static long mod = 1000000007L;
    static FastScanner scanner;

    static long m;
    static long k;

    public static void main(String[] args) {
        scanner = new FastScanner();
        long a = scanner.nextLong();
        long b = scanner.nextLong();
        if (b == a) {
            System.out.println(1);
            return;
        }
        BigInteger data = BigInteger.ONE;
        for (long x = a + 1; x <= b; x++) {
            if (x % 10 == 0) {
                System.out.println(0);
                return;
            }
            data = data.multiply(BigInteger.valueOf(x));
        }
        System.out.println(data.mod(BigInteger.TEN));
    }

    static class State {
        Map<Integer, Long> computedValues = new HashMap<>();
        State previous;

        long p;
        int l1, l2;

        int max = 1;

        public State(State previous) {
            this.previous = previous;
            if (previous != null) {
                max = previous.max + 1;
            }
        }

        long value(int x) {
            return computedValues.computeIfAbsent(x, (kk) -> doValue(x));
        }

        long doValue(int x) {
            if (x <= l1) {
                return previous.value(x + 1) + p;
            }
            if (x >= l2) {
                return previous.value(x - 1) - p;
            }
            return previous.value(x);
        }

        void initWith(long p) {
            computedValues.put(0, 0L);
            computedValues.put(1, -p);
        }

        void calcFor(long p) {
            this.p = p;
            calcL1(p);
            calcL2(p);
        }

        void calcL1(long p) {
            int l = 0;
            int r = previous.max;
            if (previous.value(0) > previous.value(1) + p) {
                l1 = -1;
                return;
            }
            /*if (previous.value(r) + p > previous.value(r - 1)) {
                l1 = r - 1;
                return;
            }*/
            while (r -l > 1) {
                int m = (l + r) / 2;
                if (previous.value(m + 1) + p > previous.value(m)) {
                    l = m;
                } else {
                    r = m;
                }
            }
            l1 = l;
        }

        void calcL2(long p) {
            int l = 1;
            int r = previous.max + 1;
            if (previous.value(0) - p > previous.value(1)) {
                l2 = 1;
                return;
            }
            while (r -l > 1) {
                int m = (l + r) / 2;
                if (previous.value(m - 1) - p < previous.value(m)) {
                    l = m;
                } else {
                    r = m;
                }
            }
            l2 = r;
        }
    }


    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            try {
                return br.readLine();
            } catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException();
            }
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) res[i] = nextInt();
            return res;
        }

        long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) res[i] = nextLong();
            return res;
        }

        String[] nextStringArray(int n) {
            String[] res = new String[n];
            for (int i = 0; i < n; i++) res[i] = nextToken();
            return res;
        }
    }

    static class PrefixSums {
        long[] sums;

        public PrefixSums(long[] sums) {
            this.sums = sums;
        }

        public long sum(int fromInclusive, int toExclusive) {
            if (fromInclusive > toExclusive) throw new IllegalArgumentException("Wrong sum");
            return sums[toExclusive] - sums[fromInclusive];
        }

        public static PrefixSums of(int[] ar) {
            long[] sums = new long[ar.length + 1];
            for (int i = 1; i <= ar.length; i++) {
                sums[i] = sums[i - 1] + ar[i - 1];
            }
            return new PrefixSums(sums);
        }

        public static PrefixSums of(long[] ar) {
            long[] sums = new long[ar.length + 1];
            for (int i = 1; i <= ar.length; i++) {
                sums[i] = sums[i - 1] + ar[i - 1];
            }
            return new PrefixSums(sums);
        }
    }

    static class ADUtils {
        static void sort(int[] ar) {
            Random rnd = ThreadLocalRandom.current();
            for (int i = ar.length - 1; i > 0; i--)
            {
                int index = rnd.nextInt(i + 1);
                // Simple swap
                int a = ar[index];
                ar[index] = ar[i];
                ar[i] = a;
            }
            Arrays.sort(ar);
        }

        static void sort(long[] ar) {
            Random rnd = ThreadLocalRandom.current();
            for (int i = ar.length - 1; i > 0; i--)
            {
                int index = rnd.nextInt(i + 1);
                // Simple swap
                long a = ar[index];
                ar[index] = ar[i];
                ar[i] = a;
            }
            Arrays.sort(ar);
        }
    }

    static class MathUtils {
        static long modpow(long b, long e, long m) {
            long result = 1;

            while (e > 0) {
                if ((e & 1) == 1) {
            /* multiply in this bit's contribution while using modulus to keep
             * result small */
                    result = (result * b) % m;
                }
                b = (b * b) % m;
                e >>= 1;
            }

            return result;
        }

        static long submod(long x, long y, long m) {
            return (x - y + m) % m;
        }
    }
}

//3 3