You are given two strings s and t, both consisting only of lowercase Latin letters.

The substring s[l..r] is the string which is obtained by taking characters s_l, s_{l + 1}, ..., s_r without changing the order.

Each of the occurrences of string a in a string b is a position i (1 ≤ i ≤ |b| - |a| + 1) such that b[i..i + |a| - 1] = a (|a| is the length of string a).

You are asked q queries: for the i-th query you are required to calculate the number of occurrences of string t in a substring s[l_i..r_i].

Input

The first line contains three integer numbers n, m and q (1 ≤ n, m ≤ 10^3, 1 ≤ q ≤ 10^5) — the length of string s, the length of string t and the number of queries, respectively.

The second line is a string s (|s| = n), consisting only of lowercase Latin letters.

The third line is a string t (|t| = m), consisting only of lowercase Latin letters.

Each of the next q lines contains two integer numbers l_i and r_i (1 ≤ l_i ≤ r_i ≤ n) — the arguments for the i-th query.

Output

Print q lines — the i-th line should contain the answer to the i-th query, that is the number of occurrences of string t in a substring s[l_i..r_i].

Examples

Input

10 3 4
codeforces
for
1 3
3 10
5 6
5 7


Output

0
1
0
1


Input

15 2 3
abacabadabacaba
ba
1 15
3 4
2 14


Output

4
0
3


Input

3 5 2
aaa
baaab
1 3
1 1


Output

0
0

Note

In the first example the queries are substrings: "cod", "deforces", "fo" and "for", respectively.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Solution {
    static class BinaryIndexTree {
        private int[] array;
        private int total;

        public BinaryIndexTree(int[] ar) {
            this.total = ar.length;
            int i = 1;
            while (i < this.total) {
                i = i * 2;
            }
            array = new int[i];
        }

        public BinaryIndexTree(int N) {
            this.total = N;
            int i = 1;
            while (i < this.total) {
                i = i * 2;
            }
            array = new int[i];
        }

        public void update(int index, int value) {
            index = index;
            while (index < total) {
                array[index] += value;
                index += index & (-index);
            }
        }

        public long sum(int index) {
            int sum = 0;
            index = index;
            while (index > 0) {
                sum += array[index];
                index -= index & (-index);
            }
            return sum;
        }

    }



    static class KMP_String {
        List<Integer> list = new ArrayList<Integer>();

        void KMPSearch(String pat, String txt) {
            int M = pat.length();
            int N = txt.length();


            int lps[] = new int[M];
            int j = 0;

            computeLPSArray(pat, M, lps);

            int i = 0;
            while (i < N) {
                if (pat.charAt(j) == txt.charAt(i)) {
                    j++;
                    i++;
                }
                if (j == M) {
                    list.add((i - j));

                    j = lps[j - 1];
                }

                else if (i < N && pat.charAt(j) != txt.charAt(i)) {

                    if (j != 0)
                        j = lps[j - 1];
                    else
                        i = i + 1;
                }
            }
        }

        void computeLPSArray(String pat, int M, int lps[]) {
            int len = 0;
            int i = 1;
            lps[0] = 0;

            while (i < M) {
                if (pat.charAt(i) == pat.charAt(len)) {
                    len++;
                    lps[i] = len;
                    i++;
                } else
                {

                    if (len != 0) {
                        len = lps[len - 1];

                    } else
                    {
                        lps[i] = len;
                        i++;
                    }
                }
            }
        }

    }

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String readLine = br.readLine();
        Scanner sc = new Scanner(readLine);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int q = sc.nextInt();
        String s = br.readLine();
        String t = br.readLine();

        BinaryIndexTree tree1 = new BinaryIndexTree(n + 2);

        KMP_String kmp_String_Matching = new KMP_String();
        kmp_String_Matching.KMPSearch(t, s);
        int patternLength = t.length();
        List<Integer> list = kmp_String_Matching.list;
        for (int i : list) {
            tree1.update(i + 1, 1);
        }

        while (q-- > 0) {
            String[] split = br.readLine().split(" ");
            int start = Integer.parseInt(split[0].trim());
            int end = Integer.parseInt(split[1].trim()) - patternLength + 1;
            if (end >= start) {
                long temp1 = tree1.sum(end);
                long temp2 = tree1.sum(start - 1);
                long answer = temp1 - temp2;
                System.out.println(answer);
            } else {
                System.out.println(0);
            }
        }
    }

}
