#SDNU1259. Problem G. play the guitar

Problem G. play the guitar

Description

lmh like playing the guitar, but he don’t satisfy others’ GTP. He want to write guitar score by himself. And he don’t want to use 5323132353231323, it’s boring! He want to find a new rhythm. So he come up with a idea: get a GTP by computer and math. So he choose nk“n^k” this expression. But we know, the guitar just have only six chords. So we have to change all 7,8,97,8,9 to 1,2,31,2,3(77 to 11, 88 to 22, 99 to 33, 00 means open string).

Now give you n and k, can you give lmh a prefect GTP?

Format

Input

Input contains multiple test cases.

Each test case starts with two numbers nn and k(0<N<=300,0<k<=300).k (0 < N <= 300, 0 < k <= 300).

Output

Calculate nkn^k and change all 7,8,97,8,9 to 1,2,31,2,3(77 to 11, 88 to 22, 99 to 33).

Samples

2 2
2 4
2 7
4
16
122