Sereja has two sequences a and b and number p. Sequence a consists of n integers a1, a2, ..., an. Similarly, sequence b consists of m integers b1, b2, ..., bm. As usual, Sereja studies the sequences he has. Today he wants to find the number of positions q (q + (m - 1)·p ≤ n; q ≥ 1), such that sequence b can be obtained from sequence aq, aq + p, aq + 2p, ..., aq + (m - 1)p by rearranging elements.

Sereja needs to rush to the gym, so he asked to find all the described positions of q.

Input

The first line contains three integers n, m and p (1 ≤ n, m ≤ 2·105, 1 ≤ p ≤ 2·105). The next line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 109). The next line contains m integers b1, b2, ..., bm (1 ≤ bi ≤ 109).

Output

In the first line print the number of valid qs. In the second line, print the valid values in the increasing order.

Examples

Input

5 3 1
1 2 3 2 1
1 2 3


Output

2
1 3


Input

6 3 2
1 3 2 2 3 1
1 2 3


Output

2
1 2
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) throws NumberFormatException, IOException {
		Scanner sc = new Scanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt(), m = sc.nextInt(), p = sc.nextInt();
		int [] a = new int[n];
		int [] b = new int[m];
		for (int i = 0; i < a.length; ++i) {
			a[i] = sc.nextInt();
		}
		HashMap<Integer, Integer> numToOccInB = new HashMap<>();
		// putting occurrences of b in map
		for (int i = 0; i < b.length; ++i) {
			//			b[i] = sc.nextInt();
			int tmp = sc.nextInt();
			numToOccInB.put(tmp, numToOccInB.getOrDefault(tmp, 0)+1);
		}
		HashMap<Integer, Integer> [] numToOccOfPthSequence = new HashMap[p];
		for (int i = 0; i < numToOccOfPthSequence.length; ++i) {
			numToOccOfPthSequence[i] = new HashMap<>();
		}
		int targetMatchingNum = numToOccInB.size(); // unique values in B
		// putting initial pth non-interesting sequences in numToOccOfPthSequence[p]
		int matchingOccWithB [] = new int[p];
		int validQs = 0;
		StringBuilder constructAns = new StringBuilder();
		for (int i = 0; i < p; ++i) {
			if(i + 1l*(m-1)*p < a.length)
				for (int j = i, k = 0; k < m && j < a.length; j += p, ++k) {
					put(i, numToOccOfPthSequence[i], numToOccInB, matchingOccWithB, a[j], 1);
				}
			validQs = addToAnswer(i, i, matchingOccWithB, targetMatchingNum, validQs, constructAns);
		}
		// sliding window
		if(1l*m*p < a.length)
			for (int i = p, s = 0, e = m*p; e < a.length; ++i, ++s, ++e) {
				int idx = i%p;
				put(idx, numToOccOfPthSequence[idx], numToOccInB, matchingOccWithB, a[e], 1);
				put(idx, numToOccOfPthSequence[idx], numToOccInB, matchingOccWithB, a[s], -1);
				validQs = addToAnswer(idx, i, matchingOccWithB, targetMatchingNum, validQs, constructAns);
			}
		out.println(validQs);
		out.println(constructAns);
		out.close();
	}
	static int addToAnswer(int idx, int i, int [] matchingOccWithB, int targetMatchingNum, int validQs, StringBuilder constructAns){

		if(matchingOccWithB[idx] == targetMatchingNum)
		{
			++validQs;
			if(constructAns.length() != 0)
				constructAns.append(" ");
			constructAns.append(i+1);
		}
		return validQs;
	}
	static void put(int i, HashMap<Integer, Integer> vals, HashMap<Integer, Integer> b, int [] match, int a, int diff){
		int tmp = vals.getOrDefault(a, 0);
		int other = b.getOrDefault(a, 0);
		if(tmp == other)
			match[i]--;
		else if(tmp+diff == other)
			match[i]++;
		vals.put(a, tmp+diff);
		if(vals.get(a) == 0)
			vals.remove(a);
	}
	static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		public Scanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(s));
		}
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}
		public boolean ready() throws IOException {return br.ready();}

	}

}