For this Question: An array Arr is considered Good if its size is more than 1 and the cost of turning the array into palindrome is <b>less than</b> floor((size of Arr)/2). Here, the cost of changing an element of the array into another element is 1. So, the cost of turning the array [1, 2, 3, 2] into [1, 2, 2, 1] is 2.

For example: An array of size 5 is good if the cost of turning it into palindrome is strictly <b>less than 2</b>.

Given N and M you have to find number of arrays of size N consisting of integers values from 1 to M such that none of its subarray is Good.

As the answer can be huge find the answer modulo 1000000007.The first and the only line of input contains two integers N and M.

Constraints:
1 <= N <= 100000
1 <= M <= 1000000000Print the answer modulo 1000000007.Sample Input 1
2 3

Sample Output 1
6

Explanation: the arrays are:
[1, 2]
[1, 3]
[2, 1]
[2, 3]
[3, 1]
[3, 2]

Sample Input 2
3 5

Sample Output 2
60, I have written this Solution Code: #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define eps 0.000000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
	return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template<class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();

//////////////
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
#define int long long  
#define f80 __float128
#define pii pair<int,int>
#define rep(i,n) for (int i=0; i<(n); i++)
/////////////

signed main()
{
	fastio;
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
	int mo=1000000007;
	int n,m;
	cin>>n>>m;
	int ans=1;
	for(int i=0;i<n;++i){
		ans=(ans*(m-i))%mo;
	}
	cout<<ans;
	#ifdef ANIKET_GOYAL
		// cout<<endl<<endl<<endl<<endl<<"Time elapsed: "<<(double)(clock()-clk)/CLOCKS_PER_SEC<<endl;
	#endif
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?