Problem: In an attempt to make peace with the Mischievious Mess Makers, Bessie and Farmer John are planning to plant some flower gardens to complement the lush, grassy fields of Bovinia. As any good horticulturist knows, each garden they plant must have the exact same arrangement of flowers. Initially, Farmer John has n different species of flowers he can plant, with ai flowers of the i-th species.

On each of the next q days, Farmer John will receive a batch of flowers of a new species. On day j, he will receive cj flowers of the same species, but of a different species from those Farmer John already has. 

Farmer John, knowing the right balance between extravagance and minimalism, wants exactly k species of flowers to be used. Furthermore, to reduce waste, each flower of the k species Farmer John chooses must be planted in some garden. And each of the gardens must be identical; that is to say that each of the k chosen species should have an equal number of flowers in each garden. As Farmer John is a proponent of national equality, he would like to create the greatest number of gardens possible.

After receiving flowers on each of these q days, Farmer John would like to know the sum, over all possible choices of k species, of the maximum number of gardens he could create. Since this could be a large number, you should output your result modulo 109 + 7.

Input

The first line of the input contains three integers n, k and q (1 ≤ k ≤ n ≤ 100 000, 1 ≤ q ≤ 100 000).

The i-th (1 ≤ i ≤ n) of the next n lines of the input contains an integer ai (1 ≤ ai ≤ 1 000 000), the number of flowers of species i Farmer John has initially.

The j-th (1 ≤ j ≤ q) of the next q lines of the input contains an integer cj (1 ≤ cj ≤ 1 000 000), the number of flowers of a new species Farmer John receives on day j.

Output

After each of the q days, output the sum of the maximum possible number of gardens, where the sum is taken over all possible choices of k species, modulo 109 + 7.

Examples

Input

3 3 2
4
6
9
8
6


Output

5
16


Input

4 1 2
6
5
4
3
2
1


Output

20
21

Note

In the first sample case, after the first day Farmer John has (4, 6, 9, 8) of each type of flower, and k = 3.

Choosing (4, 6, 8) lets him make 2 gardens, each with (2, 3, 4) of each flower, respectively. Choosing (4, 6, 9), (4, 9, 8) and (6, 9, 8) each only let him make one garden, since there is no number of gardens that each species can be evenly split into. So the sum over all choices of k = 3 flowers is 2 + 1 + 1 + 1 = 5.

After the second day, Farmer John has (4, 6, 9, 8, 6) of each flower. The sum over all choices is 1 + 2 + 2 + 1 + 1 + 2 + 2 + 3 + 1 + 1 = 16.

In the second sample case, k = 1. With x flowers Farmer John can make x gardens. So the answers to the queries are 6 + 5 + 4 + 3 + 2 = 20 and 6 + 5 + 4 + 3 + 2 + 1 = 21.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
std::vector<int> p;
int phi(int n) {
  int result = n;
  for (auto i : p) {
    if (i * i > n) break;
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
int pow2(int k, int n) {
  if (n == 0) return 1;
  if (n == 1) return k;
  int x = pow2(k, n / 2);
  return x * x * pow2(k, n % 2);
}
void del(int n, std::vector<int>& del) {
  if (n == 1) {
    del.push_back(1);
    return;
  }
  std::vector<int> razl;
  int curn = n;
  for (auto pr : p) {
    while (curn % pr == 0) {
      razl.push_back(pr);
      curn /= pr;
    }
  }
  if (curn > 1) razl.push_back(curn);
  std::vector<int> un;
  un.push_back(razl[0]);
  map<int, int> deg;
  for (auto pr : razl) deg[pr]++;
  for (int i = 1; i < razl.size(); i++) {
    if (razl[i] != razl[i - 1]) un.push_back(razl[i]);
  }
  while (un.size() < 7) un.push_back(1);
  std::vector<int> degs;
  for (int i = 0; i < 7; i++) degs.push_back(deg[un[i]]);
  for (int i0 = 0; i0 < degs[0] + 1; i0++)
    for (int i1 = 0; i1 < degs[1] + 1; i1++)
      for (int i2 = 0; i2 < degs[2] + 1; i2++)
        for (int i3 = 0; i3 < degs[3] + 1; i3++)
          for (int i4 = 0; i4 < degs[4] + 1; i4++)
            for (int i5 = 0; i5 < degs[5] + 1; i5++)
              for (int i6 = 0; i6 < degs[6] + 1; i6++) {
                int d = pow2(un[0], i0) * pow2(un[1], i1) * pow2(un[2], i2) *
                        pow2(un[3], i3) * pow2(un[4], i4) * pow2(un[5], i5) *
                        pow2(un[6], i6);
                del.push_back(d);
              }
}
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int main() {
  std::vector<bool> isp(1001, false);
  std::vector<int> mindiv(1001);
  for (int i = 2; i <= 1000; i++) {
    int sq = (int)sqrt((double)i + 1);
    bool f = false;
    for (int j = 0; j < p.size(); j++) {
      if (p[j] > sq) continue;
      if (i % p[j] == 0) {
        f = true;
        mindiv[i] = p[j];
        break;
      }
    }
    if (f) continue;
    p.push_back(i);
    isp[i] = true;
    mindiv[i] = i;
  }
  std::vector<int> num(1000001, 0);
  std::vector<long long> cnk(1000001, 0);
  std::vector<long long> inv(1000001, 0);
  std::vector<int> phin(1000001, 0);
  int n, m, k, q;
  long long ans = 0;
  std::vector<int> lol;
  scanf("%d %d %d", &n, &k, &q);
  std::vector<int> a(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    std::vector<int> dels;
    del(a[i], dels);
    for (auto x : dels) {
      if (phin[x] == 0) phin[x] = phi(x);
      num[x]++;
      if (num[x] == k) {
        cnk[x] = 1;
        ans = (ans + phin[x]) % mod;
      }
      if (num[x] > k) {
        long long old = cnk[x];
        int u = num[x] - 1;
        cnk[x] = (cnk[x] * (u + 1)) % mod;
        if (inv[u - k + 1] == 0) {
          long long xx, yy;
          gcd(u - k + 1, mod, xx, yy);
          inv[u - k + 1] = (xx + mod * mod) % mod;
        }
        cnk[x] = (cnk[x] * (inv[u - k + 1])) % mod;
        ans = (ans + phin[x] * (cnk[x] - old + mod)) % mod;
      }
    }
  }
  std::vector<int> qu(q);
  for (int i = 0; i < q; i++) {
    scanf("%d", &qu[i]);
    std::vector<int> dels;
    del(qu[i], dels);
    for (auto x : dels) {
      if (phin[x] == 0) phin[x] = phi(x);
      num[x]++;
      if (num[x] == k) {
        cnk[x] = 1;
        ans = (ans + phin[x]) % mod;
      }
      if (num[x] > k) {
        long long old = cnk[x];
        int u = num[x] - 1;
        cnk[x] = (cnk[x] * (u + 1)) % mod;
        if (inv[u - k + 1] == 0) {
          long long xx, yy;
          gcd(u - k + 1, mod, xx, yy);
          inv[u - k + 1] = (xx + mod * mod) % mod;
        }
        cnk[x] = (cnk[x] * (inv[u - k + 1])) % mod;
        ans = (ans + phin[x] * (cnk[x] - old + mod)) % mod;
      }
    }
    printf("%d\n", (int)ans);
  }
}