#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int N, Q, x; cin >> N >> Q; vector dp(N + 1, 1), dp2(N + 1, 1); for(int i = N / 2; i >= 1; i--){ for(int j = 2 * i; j <= N; j += i){ dp[i] += dp[j]; } } for(int i = 2, r = N / 2; i <= r; i++){ for(int j = 2 * i; j <= N; j += i){ dp2[j] += dp2[i]; } } while(Q--){ cin >> x; cout << dp2[x] * dp[x] << '\n'; } }