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.util.*;
import java.io.*;
public class Solution {
    static Scanner in =new Scanner(System.in);
    static final Random random=new Random();
    static int mod=1000_000_007;
    public static void main(String[] args) {
     //int tt=in.nextInt();
     // outer:while(tt-->0) {
        int n=in.nextInt();
        int m=in.nextInt();
        int q=in.nextInt();in.nextLine();
        char s[]=in.nextLine().toCharArray();char[] t=in.nextLine().toCharArray();
        
        if (m>n) {
			for (int i=0; i<q; i++) System.out.println(0);
			return;
		}boolean[] matches=new boolean[n-m+1];
		for (int i=0; i<n-m+1; i++) {
			matches[i]=true;
			for (int j=0; j<m; j++)
				if (s[i+j]!=t[j]) matches[i]=false;
		}
		int[] cs=new int[matches.length];
		cs[0]=matches[0]?1:0;
		for (int i=1; i<cs.length; i++)
			cs[i]=cs[i-1]+(matches[i]?1:0);
		for (int i=0; i<q; i++) {
			int from=in.nextInt()-1, to=in.nextInt()-1-m+1;
			if (to<from) {
				System.out.println(0);
			}
			else {
				System.out.println(from==0?cs[to]:(cs[to]-cs[from-1]));
			}
		}
       
      //}
    }
    static int nCr(int n,int r,int p){
        if (r == 0) return 1; 
        if(r==1)return n;
        return ((int)fact(n)*modInverse((int)fact(r),p)%p * modInverse((int)fact(n-r),p) % p)%p; 
    }
    static int modInverse(int n, int p){ 
        return power(n, p-2, p); 
    } 
    static int power(int x,int y,int p){ 
        int res = 1;
        x= x % p;
        while (y>0){
            if (y%2==1) 
                res= (res*x)% p;
            y= y >> 1;
            x= (x*x)% p; 
        }
        return res; 
    } 
    static int[]readAr(int n) {
        int[] a=new int[n];
        for (int i=0; i<n; i++) {a[i]=in.nextInt();}
        return a;
	}
    static int fact(int k){
        long[]f=new long[10001];f[1]=1;
        for(int i=2;i<10001;i++){
            f[i]=(i*f[i-1]% mod);
        }
        return (int)f[k];
    }
	static void ruffleSort(int[] a) {
		int n=a.length;
		for (int i=0; i<n; i++) {
			int oi=random.nextInt(n), temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	static void reverse(int []a){
        int n= a.length;
        for(int i=0;i<n/2;i++){
            int temp=a[i];
            a[i]=a[n-i-1];
            a[n-i-1]=temp;
            a[i]=a[i];
        }
        //debug(a);
	}
	static void debug(int []a) {
        for (int i=0; i<a.length;i++) System.out.print(a[i]+" ");
        //System.out.println();
	}
	static void print(List<Integer>s) {
        for(int x:s) System.out.print(x+",");
        System.out.println();
	}
	static int gcd(int a, int b) {
        return b==0 ? a : gcd(b, a % b);
	}
    static int find_max(int []a){
        int m=Integer.MIN_VALUE;
        for(int x:a)m=Math.max(x,m);
        return m;
    }
    static int find_min(int []a){
        int m=Integer.MAX_VALUE;
        for(int x:a)m=Math.min(x,m);
        return m;
    }
}