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 JAVA):

Solution:
import java.io.*;
import java.lang.Math;
import java.util.*;
import java.math.BigInteger;

public class Main
{	
	public BufferedReader in;
	public PrintStream out;
	
	public boolean log_enabled = true;
	
	long pow(long x, long k)
	{
		long r = 1;
		for (int i=0; i<k; i++)
		{
			r *= x;
		}
		return r;
	}
	
	public long modInv(long a, long n) {
	 long i = n, v = 0, d = 1;
	 while (a>0) {
	  long t = i/a, x = a;
	  a = i % x;
	  i = x;
	  x = d;
	  d = v - t*x;
	  v = x;
	 }
	 v %= n;
	 if (v<0) v = (v+n)%n;
	 return v;
	}
	
	long mod = 1000000007;
	int M = 1000001;
	long[] cnk;
	long n,k,q;
	
	long[] primes= {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,		281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619		,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997};
	
	int pcount = 168;
	
	long[] first_p = new long[M];
	
	long[] deviders = new long[1000];
	long[] devindex = new long[1000];
	int dcount;
	
	long[] f = new long[1000];		
	long[] p = new long[1000];
	long[] pindex = new long[1000];
	
	public void get_deviders(long X, boolean f_only)
	{
		int i,j,d,c = 0, x = (int)X;
		
		if (x==1)
		{
			deviders[0] = 1;
			dcount = 1;
			return;
		}
		
		while (first_p[x]>0)
		{
			d = (int)first_p[x];
			p[c] = d;
			f[c] = 0;
			while (x % d == 0)
			{
				if (f_only)
				{
					f[c] =1;
				}
				else
				{
					f[c] ++;
				}
				
				x /= d;
			}
			
			c ++;
		}
		
		/*for (i=0; (x>1) && (i<pcount); i++ )
		{
			if (x % primes[i] == 0)
			{
				p[c] = primes[i];
				f[c] = 0;
				while (x % primes[i] == 0)
				{
					if (f_only)
					{
						f[c] =1;
					}
					else
					{
						f[c] ++;
					}
					
					x /= primes[i];
				}
				
				c ++;
			}
		}*/
		
		if ((x>1))
		{
			p[c] = x;
			f[c] = 1;				
			c++;
		}
		
		dcount = 0;
		
		i = 0;
		pindex[i] = 0;
		
		while (i>=0)
		{
			if (pindex[i]>f[i])
			{
				i --;
				if (i>=0) pindex[i]++;
			}
			else
			{
				if (i+1==c)
				{
					x = 1;
					d = 1;
					for (j=0; j<=i; j++)
					{
						if (pindex[j]>0)
						{
							x *= pow(p[j], pindex[j]);
							d = -d;
						}
					}
					
					devindex[dcount] = d;
					deviders[dcount++] = x;
					
					pindex[i]++;
				}
				else
				{
					i++;
					pindex[i] = 0;
				}
			}
		}
	}
	
	public void test()
	{
		n = readLong();
		k = readLong();
		q = readLong();
		
		long[] a = readLongArray((int)(n+q));
		
		int i,j,d;
		
		for (i=0; i<pcount;i++)
		{
			for (j=(int)(primes[i]*primes[i]); j<M; j+=primes[i])
			{
				if (first_p[j]==0) first_p[j] = primes[i];
			}
		}
		
		cnk = new long[M];
		for (i=0; i<M; i++)
		{
			if (i<=k)
			{
				cnk[i] = i==k ? 1 : 0;
			}			
			else
			{
				//cnk[i] = (((cnk[i-1] % mod) * (long)i) % mod) * BigInteger.valueOf(i-k).modInverse(BigInteger.valueOf(mod)).longValue() % mod;
				cnk[i] = (((cnk[i-1] % mod) * (long)i) % mod) *  modInv(i-k, mod) % mod;
				
			}
		}
		
		long[] D = new long[M];
		
		D[1] = 1;
		for (i=2; i<M; i++)
		{
			D[i] = 0;
			get_deviders(i, true);
			for (j=0; j<dcount;j++)
			{
				D[i] += devindex[j] * (i/deviders[j]);
			}
			
			//out.printf("%d: %d\n", i, d[i]);
		}
		
		
		
		//out.println(d[24]); // 8
		//out.println(d[27720]); // 5760
		
		long sum = 0;
		int[] dv_count = new int[M];
		Arrays.fill(dv_count, 0);
		
		for (i=0; i<n+q; i++)
		{
			get_deviders(a[i], false);
			//get_deviders(i+1, false);
			
			for (j=0; j<dcount;j++)
			{
				d = (int)deviders[j];
				sum = (sum + mod - D[d] * cnk[dv_count[d]] % mod ) % mod;
				dv_count[d] ++;
				sum = (sum + D[d] * cnk[dv_count[d]] % mod ) % mod;
				
			//	out.printf("%d: + %d*cnk(%d)",  d, D[d], dv_count[d]);
			}
			
			if (i>=n)
			{
				out.println(sum);
			}
		}
		
		
		
		
	}
    
	public void run()
	{
		try
		{
			in = new BufferedReader(new InputStreamReader(System.in));
			out = System.out;
			
			//in = new BufferedReader(new FileReader("in.txt"));
			//out = new PrintStream(new File("out.txt"));
			
			
		}
		catch (Exception e)
		{
			return;
		}
		
		//while (true)
		{
			//int t = readInt(); for (int i=0; i<t; i++)					
			{
				test();
			}
		}
	}
	
	public static void main(String args[])
	{
		new Main().run();
	}
	
	private StringTokenizer tokenizer = null;
	
	public int readInt() 
	{
        return Integer.parseInt(readToken());
    }
   
    public long readLong() 
	{
        return Long.parseLong(readToken());
    }
   
    public double readDouble() 
	{
        return Double.parseDouble(readToken());
    }
   
	public String readLn()
	{	
		try
		{
			String s;
			while ((s = in.readLine()).length()==0);
			return s;
		}
		catch (Exception e)
		{
			return "";
		}
	}
	
    public String readToken() 
	{
		try
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens()) 
			{
				tokenizer = new StringTokenizer(in.readLine());
			}
			return tokenizer.nextToken();
		}
		catch (Exception e)
		{
			return "";
		}
    }
	
	public int[] readIntArray(int n)
	{
		int[] x = new int[n];
		readIntArray(x, n);
		return x;
	}
	
	public long[] readLongArray(int n)
	{
		long[] x = new long[n];
		for (int i=0; i<n; i++)
		{
			x[i] = readLong();
		}
		return x;
	}
	
	public void readIntArray(int[] x, int n)
	{
		for (int i=0; i<n; i++)
		{
			x[i] = readInt();
		}
	}
	
	public void logWrite(String format, Object... args)
	{
		if (!log_enabled)
		{
			return;
		}
		
		out.printf(format, args);
	}
}