A candy shop sells caramel candies. For every positive integer c there is exactly one package that contains exactly c candies, so the packages have sizes 1,2,3,…, one package of each size, and no new deliveries will arrive.
To reward customers, the owner has hidden m vouchers, each good for a year's supply of chocolate. Each voucher is placed in a different package (at most one voucher per package); the k-th voucher sits in the package of size bk.
The town's carnival lasts n days. On day k a party with ak guests is held. On the morning of day k, each of those ak guests buys the smallest package still on sale whose candy count is divisible by ak, so that it can be split evenly among the ak guests. Because there are ak guests, day k removes the ak smallest still-available packages whose size is a multiple of ak, in increasing order of size.
Customers are numbered 1,2,3,… across the whole carnival in the order they buy: all of an earlier day's buyers come before a later day's, and within one day the buyer of a smaller package gets the smaller number.
For example, with n=2, a1=4, a2=2, on day 1 the packages of 4,8,12,16 candies are sold, and on day 2 the packages of 2 and 6 candies are sold.
Determine which customers end up buying a package that holds a voucher.
The first line contains an integer m (1≤m≤1,000,000), the number of vouchers.
Each of the next m lines contains an integer bk (1≤bk≤1,000,000), the size (number of candies) of the package holding the k-th voucher. The values bk are given in strictly increasing order.
The next line contains an integer n (1≤n≤1,000,000), the number of carnival days.
Each of the next n lines contains an integer ak (1≤ak≤1,000,000), the number of guests at the party on day k.
Print an integer z on the first line: the number of vouchers that are sold.
On the next z lines print, in increasing order, the numbers of the customers who bought a package containing a voucher. If z=0, print only the first line.