Last digit

Time Limit
1s
Memory Limit
65536KB
Judge Program
Standard
Ratio(Solve/Submit)
0.00%(0/0)
Description:

Determine the last nonzero digit in value of expression

.

Input:

The input contains a single line with n and m separated by one or several spaces; n, m are natural numbers from 1 to 1000000, nm.

Output:

The output contains a single line with the last nonzero digit.

Sample Input:
4 2
Sample Output:
6

Submit