#include using namespace std; #define st first #define nd second #define pb push_back using ll = long long; using db = double; using ldb = long double; using pii = pair; using pll = pair; const int K = 66; const ll M = 1e9 + 7; int k; struct Matrix { Matrix() { for (int i = 0; i < k; ++i) for (int j = 0; j < k; ++j) m[i][j] = i == j; } Matrix operator*(const Matrix& o) { Matrix res; for (int i = 0; i < k; ++i) for (int j = 0; j < k; ++j) { ll c = 0; for (int t = 0; t < k; ++t) { ll add = m[i][t] * o.m[t][j]; add %= M; c = (c + add) % M; } res.m[i][j] = c; } return res; } ll m[K][K]; }; Matrix power(Matrix a, ll k) { Matrix res; while (k) { if (k & 1LL) res = res * a; a = a * a; k >>= 1LL; } return res; } int main() { ll n; scanf("%d%lld", &k, &n); Matrix x; for (int i = 0; i < k; ++i) for (int j = 0; j < k; ++j) x.m[i][j] = __gcd(i + 1, j + 1) == 1; x = power(x, n - 1); ll res = 0; for (int i = 0; i < k; ++i) for (int j = 0; j < k; ++j) res = (res + x.m[i][j]) % M; printf("%lld\n", res); return 0; }