For this Question: An array Arr is compatible with an integer X, if product of all the elements of the array Arr is a divisible by X.
Given N and K. Let S be set of all the arrays of length N with values from 1 to K (inclusive). 
Note: The values in an array do not have to be distinct.

Find the value of summation (number of arrays from set S that are compatible with i) for 1 <= i <= K.
As this value can be huge find the answer modulo 1000000007.Input Contains two integers N and K.

Constraints : 
1 <= N <= 1000000
1 <= K <= 1000Print a single integer which is the answer modulo 1000000007.Sample Input
3 2

Sample Output
15

Explanation :
S ={[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2], [2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]}
i = 1 is compatible with 8 arrays
i = 2 is compatible with 7 arrays, 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();
 
//////////////

#define clzi(x) (__builtin_clz(x))
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>
/////////////
const int MOD = 1e9 + 7;
const int MAXN = 1111;
 
int a[MAXN][MAXN], s[MAXN], t[MAXN], c[MAXN], b[MAXN][MAXN], _b[MAXN][MAXN];
 
int main() {
	int n, m; scanf("%d%d", &n, &m);
	int ans = 0;
	for (int x = 1; x <= m; x++) {
		int sn = 0;
		for (int y = 1; y <= x; y++) if (x % y == 0) s[sn] = y, t[y] = sn++;
		for (int i = 0; i < sn; i++) c[i] = 0;
		for (int y = 1; y <= m; y++) c[t[__gcd(x, y)]]++;
		for (int i = 0; i < sn; i++) for (int j = 0; j < sn; j++) a[i][j] = 0, b[i][j] = (i == j);
		for (int i = 0; i < sn; i++) for (int j = 0; j < sn; j++) a[i][t[__gcd(x, s[i] * s[j])]] += c[j];
		for (int i = 31 - clzi(n); i >= 0; i--) {
			for (int j = 0; j < sn; j++) {
				for (int k = 0; k < sn; k++) {
					int &ret = _b[j][k]; ret = 0;
					for (int l = 0; l < sn; l++) ret = (ret + (LL)b[j][l] * b[l][k]) % MOD;
				}
			}
			for (int j = 0; j < sn; j++) for (int k = 0; k < sn; k++) b[j][k] = _b[j][k];
			if (n >> i & 1) {
				for (int j = 0; j < sn; j++) {
					for (int k = 0; k < sn; k++) {
						int &ret = _b[j][k]; ret = 0;
						for (int l = 0; l < sn; l++) ret = (ret + (LL)b[j][l] * a[l][k]) % MOD;
					}
				}
				for (int j = 0; j < sn; j++) for (int k = 0; k < sn; k++) b[j][k] = _b[j][k];
			}
		}
		ans = (ans + b[0][sn - 1]) % MOD;
	}
	cout << ans << endl;
	return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?