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.*;
import java.util.*;

public class Main
{
	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tokens = br.readLine().split("\\s+");
		int n = Integer.parseInt(tokens[0]);
		int m = Integer.parseInt(tokens[1]);
		int p = Integer.parseInt(tokens[2]);
		int[] a = new int[n];
		tokens = br.readLine().split("\\s+");
		for(int i = 0; i < n; ++i)
			a[i] = Integer.parseInt(tokens[i]);
		
		TreeMap<Integer, Integer> bs = new TreeMap<Integer, Integer>();
		tokens = br.readLine().split("\\s+");
		for(int i = 0; i < m; ++i)
		{
			Integer b = Integer.valueOf(tokens[i]);
			add(bs, b);
		}
		
		ArrayList<Integer> qs = new ArrayList<Integer>();
		
		for(int start = 0; start < p; ++start)
		{
			if(start + (long)(m - 1) * p < n)
			{
				TreeMap<Integer, Integer> diff = new TreeMap<Integer, Integer>(bs);
				TreeMap<Integer, Integer> as = new TreeMap<Integer, Integer>();
				for(int i = 0; i < m; ++i)
				{
					add(as, a[start + i * p]);
					sub(diff, a[start + i * p]);
				}
				if(diff.isEmpty())
					qs.add(start);
				for(int i = start + p; i + (m - 1) * p < n; i += p)
				{
					if(diff.containsKey(a[i - p]))
					{
						diff.put(a[i - p], diff.get(a[i - p]) + 1);
					}
					else if(bs.containsKey(a[i - p]) && bs.get(a[i - p]).equals(as.get(a[i - p])))
					{
						diff.put(a[i - p], 1);
					}
					
					sub(diff, a[i + (m - 1) * p]);
					
					if(diff.isEmpty())
						qs.add(i);
					add(as, a[i + (m - 1) * p]);
					sub(as, a[i - p]);
				}
			}
		}
		
		Collections.sort(qs);
		System.out.println(qs.size());
		if(qs.size() > 0)
		{
			System.out.print(qs.get(0) + 1);
			for(int i = 1; i < qs.size(); ++i)
				System.out.print(" " + (qs.get(i) + 1));
			System.out.println();
		}
	}
	
	private static void add(TreeMap<Integer, Integer> map, Integer value)
	{
		if(map.containsKey(value))
			map.put(value, map.get(value) + 1);
		else
			map.put(value, 1);
	}
	
	private static void sub(TreeMap<Integer, Integer> map, Integer value)
	{
		if(map.containsKey(value))
		{
			if(map.get(value).equals(1))
				map.remove(value);
			else
				map.put(value, map.get(value) - 1);
		}
	}
}



/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////

class FunLib
{
	public static long gcd(long a, long b)
	{
		if(b == 0)
			return a;
		return gcd(b, a % b);
	}
	
	public static int gcd(int a, int b)
	{
		if(b == 0)
			return a;
		return gcd(b, a % b);
	}
	
	public static long lcm(long a, long b)
	{
		return a / gcd(a, b) * b;
	}
	
	public static int[][] transpose(int[][] mat)
	{
		int r = mat.length;
		int c = mat[0].length;
		int[][] result = new int[c][r];
		for(int i = 0; i < c; ++i)
			for(int j = 0; j < r; ++j)
				result[i][j] = mat[j][i];
		return result;
	}
}

abstract class AbstractSegTree
{
	public AbstractSegTree(int aSize)
	{
		size = aSize;
		storage = new int[4 * size];
	}
	
	public int getVal(int index)
	{
		return getValHelper(0, 0, size - 1, index);
	}
	
	public void rangeSet(int lower, int upper, int val)
	{
		rangeSetHelper(0, 0, size - 1, lower, upper, val);
	}
	
	protected abstract int getValHelper(int node, int beg, int end, int index);
	protected abstract void rangeSetHelper(int node, int beg, int end, int lower, int upper, int val);
	protected int[] storage;
	protected int size;
}


class Trie
{
	public Trie()
	{
		currentNode = root;
	}
	
	public void reset()
	{
		currentNode = root;
	}
	
	public void add(String word)
	{
		currentNode = root;
		for(int i = 0; i < word.length(); ++i)
		{
			// Only upper case characters
			int nodeIndex = word.charAt(i) - 'A';
			if(currentNode.children[nodeIndex] == null)
				currentNode.children[nodeIndex] = new Node();
			currentNode = currentNode.children[nodeIndex];
		}
		currentNode.isWord = true;
		currentNode = root;
	}
	
	public boolean feed(char c)
	{
		if(currentNode.children[c - 'A'] == null)
			return false;
		currentNode = currentNode.children[c - 'A'];
		return true;
	}
	
	public boolean isCurrentWord()
	{
		return currentNode.isWord;
	}
	
	private static class Node
	{
		public boolean isWord;
		// Only upper case characters
		public Node[] children = new Node[26];
	}
	
	private Node root = new Node();
	private Node currentNode;
}