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.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Vadim Semenov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    private int[] counter;
    private int nonZero;
    
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        int p = in.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++)
            a[i] = in.nextInt();
        int[] b = new int[m];
        for (int i = 0; i < b.length; i++)
            b[i] = in.nextInt();      
        
        int[] all = new int[n + m];
        System.arraycopy(a, 0, all, 0, n);
        System.arraycopy(b, 0, all, n, m);
        Arrays.sort(all);
        int cnt = 0;
        for (int i = 0; i < all.length; i++)
            if (i == 0 || all[i] != all[i - 1])
                all[cnt++] = all[i];
        all = Arrays.copyOf(all, cnt);
        counter = new int[cnt];
        for (int i = 0; i < a.length; i++)
            a[i] = Arrays.binarySearch(all, a[i]);
        for (int i = 0; i < b.length; i++)
            b[i] = Arrays.binarySearch(all, b[i]);

        for (int elem : b)
            update(elem, 1);
        List<Integer> answer = new ArrayList<Integer>();
        for (int i = 0; i < p; i++) {
            if (i + 1L * p * (m - 1) >= n)
                break;
            int start = i;
            int finish = start + p * (m - 1);
            for (int j = start; j < finish; j += p)
                update(a[j], -1);
            while (finish < n) {
                update(a[finish], -1);
                if (nonZero == 0)
                    answer.add(start + 1);
                update(a[start], 1);
                start += p;
                finish += p;
            }
            while (start < n) {
                update(a[start], 1);
                start += p;
            }
        }

        Collections.sort(answer);
        out.println(answer.size());
        for (int i = 0; i < answer.size(); i++) {
            if (i > 0)
                out.print(" ");
            out.print(answer.get(i));
        }
        out.println();
    }
    
    private void update(int index, int value) {
        if (counter[index] == 0)
            nonZero--;
        counter[index] += value;
        if (counter[index] == 0)
            nonZero++;
    }
}

class InputReader {
    private static BufferedReader bufferedReader;
    private static StringTokenizer stringTokenizer;

    public InputReader(InputStream inputStream) {
        bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
    }

    public String next() {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            try {
                stringTokenizer = new StringTokenizer(bufferedReader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

