#include #include #include #include using namespace std; const int maxn=1010; const int mod=1000000007; int dp[2][maxn][maxn]; int lcm[maxn][maxn]; int fac[maxn]; int gcd(int a,int b) { int t; while(b) { t=a%b; a=b; b=t; } return a; } int main() { int n,m,k,cnt,i,j,p,q,e,f,t,v,mul,tt; for(i=1; in) break; t=lcm[mul][fac[q]]; dp[v^1][tt][t]+=dp[v][j][mul]; dp[v^1][tt][t]%=mod; } } } v^=1; } printf("%d\n",dp[v][n][m]); } return 0; }