M=10**9+7;F=[1];P=[0] def pow(a,n=M-2) a.pow(n,M) end N,K=gets.split.map &:to_i 1.upto(K+1){|i|P<<(pow(i,K)+P[-1])%M;F<