QXJ has $N$ robots on the plane, the i-th is at $(x_i, y_i)$, numbereded 1 to $N$. Every robot is painted by one kind of color, numbered 1 to $M$.
Each robots can move $K$ times. In one move,a robot at $(x,y)$ can move to $(x-1,y),(x,y+1),(x+1,y),(x,y-1)$.
After exactly $K$ moves, she wants robots with same color to gather at the same postion and the robot on the i-th color gather at different postion with robots on (i-1)-th or (i+1)-th color.
Now she wants to know how many ways of moving these robots following to rules above.
Two ways are different if one of final postions of certain robot is different or there is at least one robot whose moving path is different.