import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;


/**
 *
 * @author
 *
 *
 *
 */

public class Main {
    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
}
 import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintStream; PrintStream java.io public class Main {
    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
} Main public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    } main {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    } MyScanner scanner = new MyScanner(); scanner new MyScanner() PrintStream out = System.out; out System.out System System.out int[] data = scanner.nextIntArray(); data scanner.nextIntArray() scanner.nextIntArray scanner String string = scanner.next(); string scanner.next() scanner.next scanner String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ; regex "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" data[1] "\\d{" "}-" "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" "\\d{" data[0] data 0 "}-" "\\d{" data[1] data 1 "}" if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        } string.matches(regex) string.matches string regex {
            out.println("Yes");
        } out.println("Yes") out.println out "Yes" {
            out.println("No");
        } out.println("No") out.println out "No" scanner.reader.close() scanner.reader.close scanner.reader scanner scanner.reader out.close() out.close out String[] args args public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    } MyScanner BufferedReader reader; reader public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        } MyScanner {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        } this.reader = new BufferedReader(new InputStreamReader(System.in)) this.reader this this.reader new BufferedReader(new InputStreamReader(System.in)) public void close() throws IOException {
            this.reader.close();
        } close {
            this.reader.close();
        } this.reader.close() this.reader.close this.reader this this.reader int nextInt() {
            return Integer.parseInt(this.next());
        } nextInt {
            return Integer.parseInt(this.next());
        } return Integer.parseInt(this.next()); Integer.parseInt(this.next()) Integer.parseInt Integer this.next() this.next this long nextLong() {
            return Long.parseLong(this.next());
        } nextLong {
            return Long.parseLong(this.next());
        } return Long.parseLong(this.next()); Long.parseLong(this.next()) Long.parseLong Long this.next() this.next this double nextDouble() {
            return Double.parseDouble(this.next());
        } nextDouble {
            return Double.parseDouble(this.next());
        } return Double.parseDouble(this.next()); Double.parseDouble(this.next()) Double.parseDouble Double this.next() this.next this String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } next {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = this.reader.readLine();
            } str = this.reader.readLine() str this.reader.readLine() this.reader.readLine this.reader this this.reader return str; str String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextStringArray {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String[] str = null; str null try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = this.reader.readLine().trim().split(" ");
            } str = this.reader.readLine().trim().split(" ") str this.reader.readLine().trim().split(" ") this.reader.readLine().trim().split this.reader.readLine().trim() this.reader.readLine().trim this.reader.readLine() this.reader.readLine this.reader this this.reader " " return str; str int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        } nextIntArray {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        } String[] data  = nextStringArray(); data nextStringArray() nextStringArray int[] a  = new int[data.length]; a new int[data.length] data.length data data.length for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
                a[i] = Integer.parseInt(data[i]);
            } {
                a[i] = Integer.parseInt(data[i]);
            } a[i] = Integer.parseInt(data[i]) a[i] a i Integer.parseInt(data[i]) Integer.parseInt Integer data[i] data i return a; a Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        } nextIntegerArray {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        } String[] data  = nextStringArray(); data nextStringArray() nextStringArray Integer[] a  = new Integer[data.length]; a new Integer[data.length] data.length data data.length for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
                a[i] = Integer.parseInt(data[i]);
            } {
                a[i] = Integer.parseInt(data[i]);
            } a[i] = Integer.parseInt(data[i]) a[i] a i Integer.parseInt(data[i]) Integer.parseInt Integer data[i] data i return a; a long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        } nextLongArray {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        } String[] data  = nextStringArray(); data nextStringArray() nextStringArray long[] a  = new long[data.length]; a new long[data.length] data.length data data.length for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
                a[i] = Long.parseLong(data[i]);
            } {
                a[i] = Long.parseLong(data[i]);
            } a[i] = Long.parseLong(data[i]) a[i] a i Long.parseLong(data[i]) Long.parseLong Long data[i] data i return a; a public class Main {
    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;


/**
 *
 * @author
 *
 *
 *
 */

public class Main {
    public static void main(String[] args) throws IOException {
        MyScanner scanner = new MyScanner();
        PrintStream out = System.out;

        int[] data = scanner.nextIntArray();
        String string = scanner.next();

        String regex = "\\d{" + data[0] +"}-" + "\\d{" + data[1]  + "}" ;

        if (string.matches(regex)) {
            out.println("Yes");
        } else {
            out.println("No");
        }

        scanner.reader.close();
        out.close();
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader reader;

        public MyScanner() {
            this.reader = new BufferedReader(new InputStreamReader(System.in));
        }

        public void close() throws IOException {
            this.reader.close();
        }

        int nextInt() {
            return Integer.parseInt(this.next());
        }

        long nextLong() {
            return Long.parseLong(this.next());
        }

        double nextDouble() {
            return Double.parseDouble(this.next());
        }

        String next() {
            String str = "";
            try {
                str = this.reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        String[] nextStringArray() {
            String[] str = null;
            try {
                str = this.reader.readLine().trim().split(" ");
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray() {
            String[] data  = nextStringArray();
            int[] a  = new int[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        Integer[] nextIntegerArray() {
            String[] data  = nextStringArray();
            Integer[] a  = new Integer[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Integer.parseInt(data[i]);
            }

            return a;
        }

        long[] nextLongArray() {
            String[] data  = nextStringArray();
            long[] a  = new long[data.length];

            for (int i = 0; i < a.length; i++) {
                a[i] = Long.parseLong(data[i]);
            }

            return a;
        }
    }
}

