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.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Main1 {

    public static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in), 1 << 20);
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    private static boolean checkArray(HashMap<Integer, Integer> aHashMap, HashMap<Integer, Integer> bHashMap) {
        if (aHashMap.size() != bHashMap.size()) return false;

        for (Integer key : aHashMap.keySet()) {
            if (!aHashMap.get(key).equals(bHashMap.get(key))) return false;
        }

        return true;
    }

    public static void main(String[] args) {
        FastReader reader = new FastReader();

        int n = reader.nextInt();
        int m = reader.nextInt();
        int p = reader.nextInt();

        int[] a = new int[n];
        int[] b = new int[m];

        for (int i = 0; i < n; i++) {
            a[i] = reader.nextInt();
        }

        HashMap<Integer, Integer> bHashMap = new HashMap<>();
        long bhash = 0;
        for (int i = 0; i < m; i++) {
            b[i] = reader.nextInt();
            bhash += b[i];
            Integer prev = bHashMap.get(b[i]);
            if (prev == null) prev = 0;
            bHashMap.put(b[i], prev + 1);
        }

        ArrayList<Integer> results = new ArrayList<>();
        for (int i = 0; i < p && i < n; i++) {
            long localHash = 0;
            HashMap<Integer, Integer> aHashMap = new HashMap<>();
            for (int j = 0; j < m && i + j * p < n; j++) {
                localHash += a[i + j * p];

                Integer prev = aHashMap.get(a[i + j * p]);
                if (prev == null) prev = 0;
                aHashMap.put(a[i + j * p], prev + 1);
            }

            int k = 0;

            while (i + ((long)k + m - 1) * p < (long)n) {
                if (localHash == bhash) {
                    if (checkArray(aHashMap, bHashMap)) {
                        results.add(i + k * p + 1);
                    }
                }

                Integer prev = aHashMap.get(a[i + k * p]);
                if (prev == 1) aHashMap.remove(a[i + k * p]);
                else aHashMap.put(a[i + k * p], prev - 1);

                localHash -= a[i + k * p];
                if (i + ((long)k + m) * p < (long)n) {
                    localHash += a[i + (k + m) * p];
                    prev = aHashMap.get(a[i + (k + m) * p]);
                    if (prev == null) prev = 0;
                    aHashMap.put(a[i + (k + m) * p], prev + 1);
                }
                k++;
            }
        }
        Collections.sort(results);
        System.out.println(results.size());
        Stream<String> stringStream = results.stream().map(i -> "" + i);
        System.out.println(String.join(" ", stringStream.collect(Collectors.toList())));
    }
}