Transylvania is invaded by zombies, and the only way to save it from the upcoming calamity is to organise an epic army which can withstand the fight.

We are given N soldiers and M tanks. If there is any tank with no soldiers inside, then the war is lost. Hence, the soldiers have to be distributed in the M tanks. Additionally, we have M mathematicians who are going to compute the exact trajectories that tanks have to fire at in order to maximize the accuracy during the fight. However, mathematician i does not want to work in the ith tank for some unknown reason.

Print the number of possible arrangements mod 666013 such that every tank has one mathematician and at least one soldier inside.

Two configurations are different if there is at least one tank which does not contain exactly the same people inside.


The first line of input contains two integers N and M.


The only line of output should contain the requested number.


  • 1 ≤ N, M ≤ 105


5 3300
3 312

Sponsors Gold