Fact

No attempts yetTime limit1sMemory limit128 MB

Problem

$N!$ (read "$N$ factorial") is the product of the first $N$ positive integers, where $N$ is a non-negative integer. For example:

 N       N!
 0       1
 1       1
 2       2
 3       6
 4      24
 5     120
10 3628800

By convention $0! = 1$. Given an integer $N$, write a program that finds the last non-zero digit of $N!$ (the first non-zero digit counting from the right). For example, $5! = 120$, so the last non-zero digit is $2$.

Input

The input consists of several lines. Each line contains one non-negative integer $N$ with $0 \le N \le 10000$. The input continues until the end of file (EOF).

Output

For each $N$, print one line. First print $N$ right-aligned in a field of width $5$, then print " -> " (space, arrow, space), and finally print the last non-zero digit of $N!$. In other words, each line has the format %5d -> %d.