#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; const ll MOD=1e9+7; ll powmod(ll a, ll k){ ll ap=a, ans=1; while(k){ if(k&1){ ans*=ap; ans%=MOD; } ap=ap*ap; ap%=MOD; k>>=1; } return ans; } ll inv(ll a){ return powmod(a, MOD-2); } int main() { int n, m; cin>>n>>m; ll dp[5001][5001]={}; dp[1][1]=1; for(int i=2; i<=m; i++){ for(int j=1; j<=i; j++){ dp[i][j]=(dp[i-1][j-1]+(ll)j*dp[i-1][j])%MOD; } } ll p0=5ll*inv(2ll)%MOD; ll p=p0; ll ans=0; for(int i=1; i<=m; i++){ ans+=dp[m][i]*p%MOD*powmod((p0+MOD-i)%MOD, (ll)n)%MOD; p*=(p0+MOD-i); p%=MOD; ans%=MOD; } cout<