#include #include #include #include using namespace std; typedef long long int ll; bool is_gcd(int a, int b) { for (int i = 2; i <= min(a, b); ++i) { if (a % i == 0 && b % i == 0) { return true; } } return false; } int main() { ios::sync_with_stdio(false); ll ans = 0; int steps, height; cin >> height >> steps; vector> good(height + 1, vector(height + 1)); for (int h = 1; h <= height; ++h) { for (int i = 1; i <= height; ++i) { if (is_gcd(h, i)) { good[h][i] = true; } } } vector prev(height + 1, 1); vector cur(height + 1); vector tmp{}; const int modulo = static_cast(pow(10, 9)) + 7; for (int step = 0; step < steps - 1; ++step) { for (int cur_i = 1; cur_i <= height; ++cur_i) { ll cur_sum = 0; for (int others_i = 1; others_i <= height; ++others_i) { if (others_i != 1 && others_i == cur_i) { continue; } if (!good[cur_i][others_i]) { cur_sum += prev[others_i]; cur_sum %= modulo; } } cur[cur_i] = cur_sum; } prev = cur; } for (int i = 1; i <= height; ++i) { ans += cur[i]; ans %= modulo; } cout << ans << endl; }