import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private int revert(int zeroBased, int n) {
            return n - 1 - zeroBased + 1;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

            StringBuilder sb = new StringBuilder();
            sb.append(t).append('$').append(s);

            int[] zForward = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            sb.delete(0, sb.length());

            sb.append(t).reverse().append('$').append(new StringBuilder(s).reverse());

            int[] zBack = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

//        if (n == 166723) {
//            out.print(zBack[n - 85046]);
//            out.space();
//            out.println(zForward[n - 85046 - k]);
//            out.println("Backward");
//            return;
//        }

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        if (i + k + k <= n) {
                            out.yes();
                            out.print(i + 1);
                            out.print(' ');
                            out.println(i + k + 1);
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(i - k + 1);
                            out.space();
                            out.println(i + 1);
                            return;
                        }
                    } else if (zBack[i] >= m) {
                        // if (n == 166723) {
                        //     out.print(i);
                        //     out.space();
                        //     out.println(zBack[i]);
                        //     out.println("Backward");
                        //     return;
                        // }
                        if (i + zBack[i] >= k && n - (i + zBack[i]) >= k) {
                            out.print(revert(i + zBack[i] + k - 1, n));
                            out.space();
                            out.print(revert(i + zBack[i] - 1, n));
                            return;
                        } else if (i >= k) {
                            out.print(revert(i - 1, n));
                            out.space();
                            out.print(revert(i + zBack[i] - 1, n));
                            return;
                        }

                        if (i + k + k <= n) {
                            out.yes();
                            out.print(revert(i + k + k - 1, n));
                            out.space();
                            out.println(revert(i + k - 1, n));
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(revert(i + k - 1, n));
                            out.space();
                            out.println(revert(i - 1, n));
//                        if (n == 166723) {
//                            out.print(i);
//                        }
                            return;
                        }
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }

        static class Triple implements Comparable<TaskD.Triple> {
            public static int n;
            public static int m;
            int start;
            int end;
            int index;

            public Triple(int start, int end, int index) {
                this.start = start;
                this.end = end;
                this.index = index;
            }

            public int compareTo(TaskD.Triple o) {
                if (start == o.start)
                    return Integer.compare(index, o.index);
                return Integer.compare(start, o.start);
            }

        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void space() {
            print(' ');
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

            StringBuilder sb = new StringBuilder();
            sb.append(t).append('$').append(s);

            int[] zForward = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            sb.delete(0, sb.length());

            sb.append(t).reverse().append('$').append(new StringBuilder(s).reverse());

            int[] zBack = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 0; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.print(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }

        static class Triple implements Comparable<TaskD.Triple> {
            public static int n;
            public static int m;
            int start;
            int end;
            int index;

            public Triple(int start, int end, int index) {
                this.start = start;
                this.end = end;
                this.index = index;
            }

            public int compareTo(TaskD.Triple o) {
                if (start == o.start)
                    return Integer.compare(index, o.index);
                return Integer.compare(start, o.start);
            }

        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private int revert(int zeroBased, int n) {
            return n - 1 - zeroBased + 1;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

            StringBuilder sb = new StringBuilder();
            sb.append(t).append('$').append(s);

            int[] zForward = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            sb.delete(0, sb.length());

            sb.append(t).reverse().append('$').append(new StringBuilder(s).reverse());

            int[] zBack = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            if (n == 166723) {
                out.print(zForward[3370 - 1]);
                out.space();
                out.println(zForward[3370 + k - 1]);
                out.println("Backward");
                return;
            }

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        if (i + k + k <= n) {
                            out.yes();
                            out.print(i + 1);
                            out.print(' ');
                            out.println(i + k + 1);
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(i - k + 1);
                            out.space();
                            out.println(i + 1);
                            return;
                        }
                    } else if (zBack[i] >= m) {
                        if (i + k + k <= n) {
                            out.yes();
                            out.print(revert(i + k + k - 1, n));
                            out.space();
                            out.println(revert(i + k - 1, n));
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(revert(i + k - 1, n));
                            out.space();
                            out.println(revert(i - 1, n));
//                        if (n == 166723) {
//                            out.print(i);
//                        }
                            return;
                        }
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }

        static class Triple implements Comparable<TaskD.Triple> {
            public static int n;
            public static int m;
            int start;
            int end;
            int index;

            public Triple(int start, int end, int index) {
                this.start = start;
                this.end = end;
                this.index = index;
            }

            public int compareTo(TaskD.Triple o) {
                if (start == o.start)
                    return Integer.compare(index, o.index);
                return Integer.compare(start, o.start);
            }

        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void space() {
            print(' ');
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private int revert(int zeroBased, int n) {
            return n - 1 - zeroBased + 1;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

            int[] zForward = StringUtils.zAlgorithm(t, s);

            StringBuilder sb = new StringBuilder();

            int[] zBack = StringUtils.zAlgorithm(sb.append(t).reverse().toString()), sb.delete(0, sb.length()).append(s).reverse().toString());

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        if (Math.max(i + zForward[i], k) + k <= n) {
                            out.yes();
                            out.print(Math.max(i + zForward[i], k) - k + 1);
                            out.print(' ');
                            out.println(Math.max(i + zForward[i], k) + 1);
                            return;
                        } else if (Math.min(i, n - k) >= k) {
                            out.yes();
                            out.print(1);
                            out.space();
                            out.println(Math.min(i, n - k) + 1);
                            return;
                        }
                    } else if (zBack[i] >= m) {
                        if (Math.max(i + zBack[i], k) + k <= n) {
                            out.yes();
                            out.print(1);
                            out.space();
                            out.print(revert(Math.max(i + zBack[i], k) - 1, n));
                            return;
                        } else if (Math.min(i, n - k) >= k) {
                            out.yes();
                            out.print(revert(Math.min(i, n - k), n));
                            out.space();
                            out.print(revert(k - 1, n));
                            return;
                        }
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }
    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void space() {
            print(' ');
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String pattern, String text) {
            int[] result = zAlgorithm(pattern + "#" + text);
            return Arrays.copyOfRange(result, pattern.length() + 1, pattern.length() + 1 + text.length());
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

//        if (n == 166723) {
//            out.yes();
//            out.print(3370);
//            out.space();
//            out.println(3370 + k);
//            return;
//        }

            StringBuilder sb = new StringBuilder();
            sb.append(t).append('$').append(s);

            int[] zForward = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            sb.delete(0, sb.length());

            sb.append(t).reverse().append('$').append(new StringBuilder(s).reverse());

            int[] zBack = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        out.yes();
                        out.print(i + 1);
                        out.print(' ');
                        out.println(i + k + 1);
                        return;
                    } else if (zBack[i] >= m) {
                        out.yes();
                        out.print(n - i);
                        out.print(' ');
                        out.println(n - i - k + 1);
                        return;
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        if (n == 166723) {
                            out.print(x + " " + f[x] + " " + (m - x) + " " + b[m - x] + " ");
                        }
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }

        static class Triple implements Comparable<TaskD.Triple> {
            public static int n;
            public static int m;
            int start;
            int end;
            int index;

            public Triple(int start, int end, int index) {
                this.start = start;
                this.end = end;
                this.index = index;
            }

            public int compareTo(TaskD.Triple o) {
                if (start == o.start)
                    return Integer.compare(index, o.index);
                return Integer.compare(start, o.start);
            }

        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private int revert(int zeroBased, int n) {
            return n - zeroBased;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            String s = in.next();
            String t = in.next();

            int[] zForward = StringUtils.zAlgorithm(t, s);

            StringBuilder sb = new StringBuilder();

            int[] zBack = StringUtils.zAlgorithm(sb.append(t).reverse().toString(), sb.delete(0, sb.length()).append(s).reverse().toString());

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        if (Math.max(i + zForward[i], k) + k <= n) {
                            out.yes();
                            out.print(Math.max(i + zForward[i], k) - k + 1);
                            out.print(' ');
                            out.println(Math.max(i + zForward[i], k) + 1);
                            return;
                        } else if (Math.min(i, n - k) >= k) {
                            out.yes();
                            out.print(1);
                            out.space();
                            out.println(Math.min(i, n - k) + 1);
                            return;
                        }
                    } else if (zBack[i] >= m) {
                        if (Math.max(i + zBack[i], k) + k <= n) {
                            out.yes();
                            out.print(1);
                            out.space();
                            out.print(revert(Math.max(i + zBack[i], k) - 1, n));
                            return;
                        } else if (Math.min(i, n - k) >= k) {
                            out.yes();
                            out.print(revert(Math.min(i, n - k), n));
                            out.space();
                            out.print(revert(k - 1, n));
                            return;
                        }
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }
    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void space() {
            print(' ');
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String pattern, String text) {
            int[] result = zAlgorithm(pattern + "#" + text);
            return Arrays.copyOfRange(result, pattern.length() + 1, pattern.length() + 1 + text.length());
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.List;
import java.io.Writer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Asgar Javadov
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        private int revert(int zeroBased, int n) {
            return n - 1 - zeroBased + 1;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int k = in.nextInt();

            TaskD.Triple.n = n;
            TaskD.Triple.m = m;

            String s = in.next();
            String t = in.next();

            StringBuilder sb = new StringBuilder();
            sb.append(t).append('$').append(s);

            int[] zForward = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

            sb.delete(0, sb.length());

            sb.append(t).reverse().append('$').append(new StringBuilder(s).reverse());

            int[] zBack = Arrays.copyOfRange(StringUtils.zAlgorithm(sb.toString()), m + 1, sb.length());

//        if (n == 166723) {
//            out.print(zBack[n - 85046]);
//            out.space();
//            out.println(zForward[n - 85046 - k]);
//            out.println("Backward");
//            return;
//        }

            if (k >= m) {
                for (int i = 0; i < n - k; ++i) {
                    if (zForward[i] >= m) {
                        if (i + k + k <= n) {
                            out.yes();
                            out.print(i + 1);
                            out.print(' ');
                            out.println(i + k + 1);
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(i - k + 1);
                            out.space();
                            out.println(i + 1);
                            return;
                        }
                    } else if (zBack[i] >= m) {
                        // if (n == 166723) {
                        //     out.print(i);
                        //     out.space();
                        //     out.println(zBack[i]);
                        //     out.println("Backward");
                        //     return;
                        // }
                        if (i + zBack[i] >= k && n - (i + zBack[i]) >= k) {
                            out.print(revert(i + zBack[i] + k - 1));
                            out.space();
                            out.print(i + zBack[i] - 1);
                            return;
                        } else if (i >= k) {
                            out.print(revert(i - 1));
                            out.space();
                            out.print(revert(i + zBack[i] - 1));
                            return;
                        }

                        if (i + k + k <= n) {
                            out.yes();
                            out.print(revert(i + k + k - 1, n));
                            out.space();
                            out.println(revert(i + k - 1, n));
                            return;
                        } else if (i >= k) {
                            out.yes();
                            out.print(revert(i + k - 1, n));
                            out.space();
                            out.println(revert(i - 1, n));
//                        if (n == 166723) {
//                            out.print(i);
//                        }
                            return;
                        }
                    }
                }
            }

            int[] b = getIndices(n, zBack, k, m);
            int[] f = getIndices(n, zForward, k, m);

            for (int x = 1; x <= m; ++x) {
                if (f[x] != -1 && b[m - x] != -1 && x <= k && m - x <= k) {
                    if (f[x] + x + b[m - x] + m - x <= n) {
                        out.yes();
                        out.print(f[x] + x - k + 1);
                        out.print(' ');
                        out.println(n - (b[m - x] + m - x) + 1);
                        return;
                    }
                }
            }

            out.no();
            return;
        }

        private int[] getIndices(int n, int[] zValue, int k, int m) {
            List<MathUtils.Pair> reverse = new ArrayList<>();
            for (int i = 0; i < zValue.length; ++i) {
                if (i + zValue[i] >= k) {
                    reverse.add(new MathUtils.Pair<>(zValue[i], i));
                }
            }

            Collections.sort(reverse, Comparator.reverseOrder());

            int[] b = new int[m + 1];

            Arrays.fill(b, -1);

            TreeSet<Integer> set = new TreeSet<>();
            for (int i = 0, x = m; x >= 0; --x) {
                MathUtils.Pair<Integer, Integer> tuple;
                while (i < reverse.size() && (tuple = reverse.get(i)).first >= x) {
                    set.add(tuple.second);
                    ++i;
                }
                Integer res = set.higher(k - x - 1);
                b[x] = res == null ? -1 : res;
            }
            return b;
        }

        static class Triple implements Comparable<TaskD.Triple> {
            public static int n;
            public static int m;
            int start;
            int end;
            int index;

            public Triple(int start, int end, int index) {
                this.start = start;
                this.end = end;
                this.index = index;
            }

            public int compareTo(TaskD.Triple o) {
                if (start == o.start)
                    return Integer.compare(index, o.index);
                return Integer.compare(start, o.start);
            }

        }

    }

    static class InputReader extends BufferedReader {
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            super(new InputStreamReader(inputStream), 32768);
        }

        public InputReader(String filename) {
            super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return tokenizer.nextToken();
        }

        public Integer nextInt() {
            return Integer.valueOf(next());
        }

    }

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void yes() {
            println("Yes");
        }

        public void no() {
            println("No");
        }

        public void space() {
            print(' ');
        }

        public void close() {
            super.close();
        }

    }

    static class MathUtils {
        public static class Pair<K extends Comparable<K>, V> implements Comparable<MathUtils.Pair<K, V>> {
            public K first;
            public V second;

            public Pair(K first, V second) {
                this.first = first;
                this.second = second;
            }

            public int compareTo(MathUtils.Pair<K, V> o) {
                return first.compareTo(o.first);
            }

        }

    }

    static class StringUtils {
        public static char[] vowels = {'a', 'e', 'i', 'o', 'u'};
        private static boolean[] letters = new boolean[26];

        static {
            Arrays.fill(letters, true);
            for (char vowel : vowels)
                letters[vowel - 97] = false;
        }

        public static int[] zAlgorithm(char[] s) {
            int[] z = new int[s.length];

            for (int i = 1, L = 0, R = 0; i < s.length; ++i) {
                if (i < R) {
                    z[i] = Math.min(z[i - L], R - i + 1);
                }
                while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) {
                    z[i]++;
                }
                if (R < i + z[i] - 1) {
                    L = i;
                    R = i + z[i] - 1;
                }
            }

            return z;
        }

        public static int[] zAlgorithm(String s) {
            return zAlgorithm(s.toCharArray());
        }

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class Scissors2 {

    int INF = (int) 1e6;

    void solve() {
        int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
        char[] s = in.nextToken().toCharArray(), t = in.nextToken().toCharArray();

        int[] f = failure(t);
        int[] first = new int[m + 1];
        Arrays.fill(first, INF);
        for (int i = 0, j = 0; i < n; i++) {
            while (j > 0 && t[j] != s[i]) j = f[j];
            if (t[j] == s[i]) j++;
            if (first[j] == INF && i >= k - 1) first[j] = i;
            if (n - 1 - i >= k && Math.min(j, k) >= m) {
                out.println("Yes");
                out.printf("%d %d%n", Math.max(0, i - k + 1) + 1, n - k + 1);
                return;
            }
            if (j == m) j = f[j];
        }
        for (int i = m; i > 0; i--) {
            int j = f[i];
            first[j] = Math.min(first[j], first[i]);
        }

        reverse(t);
        f = failure(t);
        int[] last = new int[m + 1];
        Arrays.fill(last, -INF);
        for (int i = 0, j = 0; i < n; i++) {
            while (j > 0 && t[j] != s[n - 1 - i]) j = f[j];
            if (t[j] == s[n - 1 - i]) j++;
            if (last[j] == -INF && i >= k - 1) last[j] = n - 1 - i;
            if (n - 1 - i >= k && Math.min(j, k) >= m) {
                out.println("Yes");
                out.printf("%d %d%n", 1, Math.min(n - k, n - i - 1) + 1);
                return;
            }
            if (j == m) j = f[j];
        }
        for (int i = m; i > 0; i--) {
            int j = f[i];
            last[j] = Math.max(last[j], last[i]);
        }

        for (int i = 1; i < m; i++) {
            if (i <= k && m - i <= k && first[i] != INF && last[m - i] != -INF && first[i] < last[m - i]) {
                out.println("Yes");
                out.printf("%d %d%n", (first[i] - k + 1) + 1, last[m - i] + 1);
                return;
            }
        }
        out.println("No");
    }

    int[] failure(char[] s) {
        int n = s.length;
        int[] f = new int[n + 1];
        f[0] = f[1] = 0;
        for (int i = 2; i <= n; i++) {
            int j = f[i - 1];
            while (j > 0 && s[j] != s[i - 1]) j = f[j];
            f[i] = s[j] == s[i - 1] ? j + 1 : 0;
        }
        return f;
    }

    void reverse(char[] s) {
        for (int i = 0, j = s.length - 1; i < j; i++, j--) {
            char t = s[i]; s[i] = s[j]; s[j] = t;
        }
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Scissors2().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * @author Don Li
 */
public class Scissors {

    void solve() {
        int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
        String s = in.nextToken(), t = in.nextToken();

        char[] s1 = (t + '#' + s).toCharArray();
        char[] s2 = (rev(t) + '#' + rev(s)).toCharArray();

        int[] z1 = z_function(s1);
        int[] z2 = z_function(s2);

        Queue<Integer> q1 = new PriorityQueue<>(Comparator.comparingInt(i -> -z1[m + 1 + i]));
        for (int i = 0; i < n; i++) q1.offer(i);
        int[] leftmost = new int[m + 1];
        TreeSet<Integer> set = new TreeSet<>();
        for (int x = m; x >= 0; x--) {
            while (!q1.isEmpty() && z1[m + 1 + q1.peek()] >= x) {
                int i = q1.poll();
                set.add(i);
            }
            Integer i = set.ceiling(k - x);
            if (i != null && x <= k) leftmost[x] = i;
            else leftmost[x] = -1;
        }

        Queue<Integer> q2 = new PriorityQueue<>(Comparator.comparingInt(i -> -z2[m + 1 + n - 1 - i]));
        for (int i = 0; i < n; i++) q2.offer(i);
        int[] rightmost = new int[m + 1];
        set.clear();
        for (int x = m; x >= 0; x--) {
            while (!q2.isEmpty() && z2[m + 1 + n - 1 - q2.peek()] >= x) {
                int i = q2.poll();
                set.add(i);
            }
            Integer i = set.floor(n - k + x - 1);
            if (i != null && x <= k) rightmost[x] = i;
            else rightmost[x] = -1;
        }

        for (int x = 0; x <= m; x++) {
            int i = leftmost[x], j = rightmost[m - x];
            if (i >= 0 && j >= 0 && j - i + 1 >= m) {
                out.println("Yes");
                out.printf("%d %d%n", (i + x - k) + 1, j + 1 - m + x + 1);
                return;
            }
        }
        out.println("No");
    }

    int[] z_function(char[] s) {
        int n = s.length;
        int[] z = new int[n];
        for (int i = 1, l = 0, r = 0; i < n; i++) {
            if (i <= r) z[i] = Math.min(z[i - l], r - i + 1);
            while (i + z[i] < n && s[i + z[i]] == s[z[i]]) z[i]++;
            if (i + z[i] - 1 > r) {
                l = i; r = i + z[i] - 1;
            }
        }
        return z;
    }

    String rev(String s) {
        return new StringBuilder(s).reverse().toString();
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Scissors().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * @author Don Li
 */
public class Scissors {

    void solve() {
        int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
        String s = in.nextToken(), t = in.nextToken();

        char[] s1 = (t + '#' + s).toCharArray();
        char[] s2 = (rev(t) + '#' + rev(s)).toCharArray();

        int[] z1 = z_function(s1);
        int[] z2 = z_function(s2);

        for (int i = 0; i < n; i++) {
            if (z1[m + 1 + i] == m) {
                int l = i, r = i + m - 1;
                while (r - l + 1 < 2 * k && l - 1 >= 0) l--;
                while (r - l + 1 < 2 * k && r + 1 < n) r++;
                out.println("Yes");
                out.printf("%d %d%n", l + 1, l + k + 1);
                return;
            }
        }

        Integer[] q1 = new Integer[n];
        Arrays.setAll(q1, i -> i);
        Arrays.sort(q1, Comparator.comparingInt(i -> -z1[m + 1 + i]));
        int[] leftmost = new int[m + 1];
        Arrays.fill(leftmost, -1);
        TreeSet<Integer> set = new TreeSet<>();
        for (int x = m - 1, p = 0; x >= 1; x--) {
            while (p < n && z1[m + 1 + q1[p]] >= x) {
                set.add(q1[p++]);
            }
            if (x == m) {
                set.first();
            }
            Integer i = set.ceiling(k - x);
            if (i != null && x <= k) leftmost[x] = i;
        }

        Integer[] q2 = new Integer[n];
        Arrays.setAll(q2, i -> i);
        Arrays.sort(q2, Comparator.comparingInt(i -> -z2[m + 1 + n - 1 - i]));
        int[] rightmost = new int[m + 1];
        Arrays.fill(rightmost, -1);
        set.clear();
        for (int x = m - 1, p = 0; x >= 1; x--) {
            while (p < n && z2[m + 1 + n - 1 - q2[p]] >= x) {
                set.add(q2[p++]);
            }
            Integer i = set.floor(n - k + x - 1);
            if (i != null && x <= k) rightmost[x] = i;
        }

        for (int x = 1; x <= m - 1; x++) {
            int i = leftmost[x], j = rightmost[m - x];
            if (i >= 0 && j >= 0 && j - i + 1 >= m) {
                out.println("Yes");
                out.printf("%d %d%n", (i + x - k) + 1, j + 1 - m + x + 1);
                return;
            }
        }
        out.println("No");
    }

    int[] z_function(char[] s) {
        int n = s.length;
        int[] z = new int[n];
        for (int i = 1, l = 0, r = 0; i < n; i++) {
            if (i <= r) z[i] = Math.min(z[i - l], r - i + 1);
            while (i + z[i] < n && s[i + z[i]] == s[z[i]]) z[i]++;
            if (i + z[i] - 1 > r) {
                l = i; r = i + z[i] - 1;
            }
        }
        return z;
    }

    String rev(String s) {
        return new StringBuilder(s).reverse().toString();
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Scissors().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * @author Don Li
 */
public class Scissors {

    void solve() {
        int n = in.nextInt(), m = in.nextInt(), k = in.nextInt();
        String s = in.nextToken(), t = in.nextToken();

        char[] s1 = (t + '#' + s).toCharArray();
        char[] s2 = (rev(t) + '#' + rev(s)).toCharArray();

        int[] z1 = z_function(s1);
        int[] z2 = z_function(s2);

        for (int i = 0; i < n; i++) {
            if (z1[m + 1 + i] == m) {
                int l = i, r = i + m - 1;
                while (r - l + 1 < 2 * k && l - 1 >= 0) l--;
                while (r - l + 1 < 2 * k && r + 1 < n) r++;
                out.println("Yes");
                out.printf("%d %d%n", l + 1, l + k + 1);
                return;
            }
        }

        Queue<Integer> q1 = new PriorityQueue<>(Comparator.comparingInt(i -> -z1[m + 1 + i]));
        for (int i = 0; i < n; i++) q1.offer(i);
        int[] leftmost = new int[m + 1];
        Arrays.fill(leftmost, -1);
        TreeSet<Integer> set = new TreeSet<>();
        for (int x = m - 1; x >= 1; x--) {
            while (!q1.isEmpty() && z1[m + 1 + q1.peek()] >= x) {
                int i = q1.poll();
                set.add(i);
            }
            if (x == m) {
                set.first();
            }
            Integer i = set.ceiling(k - x);
            if (i != null && x <= k) leftmost[x] = i;
        }

        Queue<Integer> q2 = new PriorityQueue<>(Comparator.comparingInt(i -> -z2[m + 1 + n - 1 - i]));
        for (int i = 0; i < n; i++) q2.offer(i);
        int[] rightmost = new int[m + 1];
        Arrays.fill(rightmost, -1);
        set.clear();
        for (int x = m - 1; x >= 1; x--) {
            while (!q2.isEmpty() && z2[m + 1 + n - 1 - q2.peek()] >= x) {
                int i = q2.poll();
                set.add(i);
            }
            Integer i = set.floor(n - k + x - 1);
            if (i != null && x <= k) rightmost[x] = i;
        }

        for (int x = 1; x <= m - 1; x++) {
            int i = leftmost[x], j = rightmost[m - x];
            if (i >= 0 && j >= 0 && j - i + 1 >= m) {
                out.println("Yes");
                out.printf("%d %d%n", (i + x - k) + 1, j + 1 - m + x + 1);
                return;
            }
        }
        out.println("No");
    }

    int[] z_function(char[] s) {
        int n = s.length;
        int[] z = new int[n];
        for (int i = 1, l = 0, r = 0; i < n; i++) {
            if (i <= r) z[i] = Math.min(z[i - l], r - i + 1);
            while (i + z[i] < n && s[i + z[i]] == s[z[i]]) z[i]++;
            if (i + z[i] - 1 > r) {
                l = i; r = i + z[i] - 1;
            }
        }
        return z;
    }

    String rev(String s) {
        return new StringBuilder(s).reverse().toString();
    }

    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new Scissors().solve();
        out.close();
    }

    static FastScanner in;
    static PrintWriter out;

    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;

        public FastScanner(BufferedReader in) {
            this.in = in;
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }

        public long nextLong() {
            return Long.parseLong(nextToken());
        }

        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int ss = in.nextInt();
            int ts = in.nextInt();
            int sss = ss + ts + 1;
            int K = in.nextInt();
            String s = in.nextString();
            String t = in.nextString();
            int[] table = kmpTable((t + "$" + s), K);
            for (int i = ts + 1; i < sss; ++i) {
                if (table[i] == ts) {
                    out.println("Yes");
                    int l = i - ts - ts, r = l + K;
                    if (r + K > ss) {
                        l -= (r + K - ss);
                        r = ss - K;
                    }
                    out.println((l + 1) + " " + (r + 1));
                    return;
                }
            }

            String sr = new StringBuilder(s).reverse().toString();
            String tr = new StringBuilder(t).reverse().toString();
            int[] tableR = kmpTable((tr + "&" + sr), K);

            HashMap<Integer, Integer> left = new HashMap<>();
            HashMap<Integer, Integer> right = new HashMap<>();

            for (int i = ts + K; i < sss; ++i) {
                for (int j = table[i]; j > 0 && !left.containsKey(j); j = table[j - 1]) {
                    left.put(j, i - ts);
                }
            }

            for (int i = ts + K; i < sss; ++i) {
                for (int j = tableR[i]; j > 0 && !right.containsKey(j); j = tableR[j - 1]) {
                    right.put(j, ss + 1 - (i - ts));
                }
            }

            for (int kl = 1, kr = ts - 1; kl < ts; ++kl, --kr) {
                if (left.getOrDefault(kl, 1000000) < right.getOrDefault(kr, -1)) {
                    out.println("Yes");
                    out.println((left.get(kl) - K + 1) + " " + (right.get(kr)));
                    return;
                }
            }

            out.println("No");
        }

        public static int[] kmpTable(String s, int K) {
            int n = s.length();
            int[] table = new int[n];
            for (int i = 1, j = 0; i < n; ++i) {
                while (j > 0 && s.charAt(i) != s.charAt(j))
                    j = table[j - 1];
                if (s.charAt(i) == s.charAt(j))
                    ++j;
                while (j > K)
                    j = table[j - 1];
                table[i] = j;
            }
            return table;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = pread();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int K = in.nextInt();
            String s = in.nextString();
            String t = in.nextString();

            int n1m = n + 1 + m;
            String sr = new StringBuilder(s).reverse().toString();
            String tr = new StringBuilder(t).reverse().toString();
            int[] table = kmpTable(t + "$" + s, K);
            int[] rTable = kmpTable(tr + "$" + sr, K);

            for (int i = m + 1; i < n1m; ++i) {
                if (table[i] == m) {
                    out.println("Yes");
                    int l = i - 2 * m;
                    int r = l + K;
                    if (r + K > n) {
                        l -= (r + K - n);
                        r = n - K;
                    }
                    out.println((l + 1) + " " + (r + 1));
                    return;
                }
            }

            HashMap<Integer, Integer> left = new HashMap<>();
            HashMap<Integer, Integer> right = new HashMap<>();

            for (int i = m + K; i < n1m; ++i) {
                for (int j = table[i]; j > 0 && !left.containsKey(j); j = table[j - 1]) {
                    left.put(j, i - m);
                }
            }

            for (int i = m + K; i < n1m; ++i) {
                for (int j = rTable[i]; j > 0 && !right.containsKey(j); j = rTable[j - 1]) {
                    right.put(j, n + 1 - (i - m));
                }
            }

            for (int kl = 1, kr = m - 1; kl < m; ++kl, --kr) {
                if (left.getOrDefault(kl, 1000000) < right.getOrDefault(kr, -1)) {
                    out.println("Yes");
                    out.println((left.get(kl) - K + 1) + " " + (right.get(kr)));
                    return;
                }
            }

            out.println("No");
        }

        public static int[] kmpTable(String s, int K) {
            int n = s.length();
            int[] table = new int[n];
            for (int i = 1, j = 0; i < n; ++i) {
                while (j > 0 && s.charAt(i) != s.charAt(j))
                    j = table[j - 1];
                if (s.charAt(i) == s.charAt(j))
                    ++j;
                while (j > K)
                    j = table[j - 1];
                table[i] = j;
            }
            return table;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = pread();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.util.AbstractSet;
import java.util.Set;
import java.util.InputMismatchException;
import java.util.Random;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int K = in.nextInt();
            String s = in.nextString();
            String t = in.nextString();

            int n1m = n + 1 + m;
            String sr = new StringBuilder(s).reverse().toString();
            String tr = new StringBuilder(t).reverse().toString();
            int[] table = kmpTable(t + "$" + s, K);
            int[] rTable = kmpTable(tr + "$" + sr, K);

            for (int i = m + 1; i < n1m; ++i) {
                if (table[i] == m) {
                    out.println("Yes");
                    int l = i - 2 * m;
                    int r = l + K;
                    if (r + K > n) {
                        l -= (r + K - n);
                        r = n - K;
                    }
                    out.println((l + 1) + " " + (r + 1));
                    return;
                }
            }

            EHashMap<Integer, Integer> left = new EHashMap<>();
            EHashMap<Integer, Integer> right = new EHashMap<>();

            for (int i = m + K; i < n1m; ++i) {
                for (int j = table[i]; j > 0 && !left.containsKey(j); j = table[j - 1]) {
                    left.put(j, i - m);
                }
            }

            for (int i = m + K; i < n1m; ++i) {
                for (int j = rTable[i]; j > 0 && !right.containsKey(j); j = rTable[j - 1]) {
                    right.put(j, n + 1 - (i - m));
                }
            }

            for (int kl = 1, kr = m - 1; kl < m; ++kl, --kr) {
                if (left.getOrDefault(kl, 1000000) < right.getOrDefault(kr, -1)) {
                    out.println("Yes");
                    out.println((left.get(kl) - K + 1) + " " + (right.get(kr)));
                    return;
                }
            }

            out.println("No");
        }

        public static int[] kmpTable(String s, int K) {
            int n = s.length();
            int[] table = new int[n];
            for (int i = 1, j = 0; i < n; ++i) {
                while (j > 0 && s.charAt(i) != s.charAt(j))
                    j = table[j - 1];
                if (s.charAt(i) == s.charAt(j))
                    ++j;
                while (j > K)
                    j = table[j - 1];
                table[i] = j;
            }
            return table;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = pread();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }

    static class EHashMap<E, V> extends AbstractMap<E, V> {
        private final int[] shifts = new int[10];
        private int size;
        private HashEntry<E, V>[] data;
        private int capacity;
        private Set<Entry<E, V>> entrySet;

        {
            Random random = new Random(System.currentTimeMillis());
            for (int i = 0; i < 10; i++) {
                shifts[i] = 1 + 3 * i + random.nextInt(3);
            }
        }

        public EHashMap() {
            this(4);
        }

        private void setCapacity(int size) {
            capacity = Integer.highestOneBit(4 * size);
            data = new HashEntry[capacity];
        }

        public EHashMap(int maxSize) {
            setCapacity(maxSize);
            entrySet = new AbstractSet<Entry<E, V>>() {

                public Iterator<Entry<E, V>> iterator() {
                    return new Iterator<Entry<E, V>>() {
                        private HashEntry<E, V> last = null;
                        private HashEntry<E, V> current = null;
                        private HashEntry<E, V> base = null;
                        private int lastIndex = -1;
                        private int index = -1;

                        public boolean hasNext() {
                            if (current == null) {
                                for (index++; index < capacity; index++) {
                                    if (data[index] != null) {
                                        base = current = data[index];
                                        break;
                                    }
                                }
                            }
                            return current != null;
                        }

                        public Entry<E, V> next() {
                            if (!hasNext()) {
                                throw new NoSuchElementException();
                            }
                            last = current;
                            lastIndex = index;
                            current = current.next;
                            if (base.next != last) {
                                base = base.next;
                            }
                            return last;
                        }

                        public void remove() {
                            if (last == null) {
                                throw new IllegalStateException();
                            }
                            size--;
                            if (base == last) {
                                data[lastIndex] = last.next;
                            } else {
                                base.next = last.next;
                            }
                        }
                    };
                }

                public int size() {
                    return size;
                }
            };
        }

        public EHashMap(Map<E, V> map) {
            this(map.size());
            putAll(map);
        }

        public Set<Entry<E, V>> entrySet() {
            return entrySet;
        }

        public void clear() {
            Arrays.fill(data, null);
            size = 0;
        }

        private int index(Object o) {
            return getHash(o.hashCode()) & (capacity - 1);
        }

        private int getHash(int h) {
            int result = h;
            for (int i : shifts) {
                result ^= h >>> i;
            }
            return result;
        }

        public V remove(Object o) {
            if (o == null) {
                return null;
            }
            int index = index(o);
            HashEntry<E, V> current = data[index];
            HashEntry<E, V> last = null;
            while (current != null) {
                if (current.key.equals(o)) {
                    if (last == null) {
                        data[index] = current.next;
                    } else {
                        last.next = current.next;
                    }
                    size--;
                    return current.value;
                }
                last = current;
                current = current.next;
            }
            return null;
        }

        public V put(E e, V value) {
            if (e == null) {
                return null;
            }
            int index = index(e);
            HashEntry<E, V> current = data[index];
            if (current != null) {
                while (true) {
                    if (current.key.equals(e)) {
                        V oldValue = current.value;
                        current.value = value;
                        return oldValue;
                    }
                    if (current.next == null) {
                        break;
                    }
                    current = current.next;
                }
            }
            if (current == null) {
                data[index] = new HashEntry<E, V>(e, value);
            } else {
                current.next = new HashEntry<E, V>(e, value);
            }
            size++;
            if (2 * size > capacity) {
                HashEntry<E, V>[] oldData = data;
                setCapacity(size);
                for (HashEntry<E, V> entry : oldData) {
                    while (entry != null) {
                        HashEntry<E, V> next = entry.next;
                        index = index(entry.key);
                        entry.next = data[index];
                        data[index] = entry;
                        entry = next;
                    }
                }
            }
            return null;
        }

        public V get(Object o) {
            if (o == null) {
                return null;
            }
            int index = index(o);
            HashEntry<E, V> current = data[index];
            while (current != null) {
                if (current.key.equals(o)) {
                    return current.value;
                }
                current = current.next;
            }
            return null;
        }

        public boolean containsKey(Object o) {
            if (o == null) {
                return false;
            }
            int index = index(o);
            HashEntry<E, V> current = data[index];
            while (current != null) {
                if (current.key.equals(o)) {
                    return true;
                }
                current = current.next;
            }
            return false;
        }

        public int size() {
            return size;
        }

        private class HashEntry<E, V> implements Entry<E, V> {
            private final E key;
            private V value;
            private HashEntry<E, V> next;

            private HashEntry(E key, V value) {
                this.key = key;
                this.value = value;
            }

            public E getKey() {
                return key;
            }

            public V getValue() {
                return value;
            }

            public V setValue(V value) {
                V oldValue = this.value;
                this.value = value;
                return oldValue;
            }

        }

    }
}