In this problem you will be given two decimal integer number **N, M**.
You will have to find the last non-zero digit of the ^{N}**P _{M}**. This means no of permutations
of

**
Input **

The input file contains several lines of input. Each** **line** **of
the input file contains two integers **N (0<=N<=20000000)**, **M (0<=N)**. Input is terminated by end-of-file.

**Output**

For each
line of the input file you should output a single digit, which is the last
non-zero digit of ^{N}**P _{M}**. For example, if

**
Sample Input**

10 5

25 6

**Sample Output**

4

2

**Shahriar Manzoor**