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
#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int M = 200005;
int n, m, p, b[M], c[M], t[4 * M];
pair<int, int> a[N];
vector<int> res;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.second % p == b.second % p) return a.second < b.second;
  return a.second % p < b.second % p;
}
void Inp() {
  cin >> n >> m >> p;
  for (int i = 1; i <= n; i++) cin >> a[i].first;
  for (int i = 1; i <= m; i++) cin >> b[i], c[i] = b[i];
  sort(c + 1, c + m + 1);
  for (int i = 1; i <= m; i++) b[i] = lower_bound(c + 1, c + m + 1, b[i]) - c;
  for (int i = 1; i <= n; i++) {
    int pos = lower_bound(c + 1, c + m + 1, a[i].first) - c;
    if (c[pos] != a[i].first)
      a[i].first = 0;
    else
      a[i].first = pos;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1, cmp);
}
void up(int k, int l, int r, int pos, int val) {
  if (l > pos || r < pos) return;
  if (l == r) {
    t[k] += val;
    return;
  }
  int m = (l + r) / 2;
  int node = k * 2;
  up(node, l, m, pos, val);
  up(node + 1, m + 1, r, pos, val);
  t[k] = min(t[node], t[node + 1]);
}
int rep(int first) {
  up(1, 1, m, a[first].first, 1);
  if (first < m) return 0;
  up(1, 1, m, a[first - m].first, -1);
  return (t[1] == 0 && a[first].second % p == a[first - m + 1].second % p);
}
int main() {
  ios_base::sync_with_stdio(0);
  Inp();
  fill(c + 1, c + m + 1, 0);
  for (int i = 1; i <= m; i++) c[b[i]]++;
  for (int i = 1; i <= m; i++) up(1, 1, m, i, -c[i]);
  for (int i = 1; i <= n; i++)
    if (rep(i)) res.push_back(a[i - m + 1].second);
  sort(res.begin(), res.end());
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) cout << res[i] << " ";
  return 0;
}
