import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskB solver = new TaskB(); solver new TaskB() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    } TaskB public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        } solve {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        } int a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in String s = in.next(); s in.next() in.next in for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } char ch = s.charAt(i); ch s.charAt(i) s.charAt s i if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                } !(ch >= '0' && ch <= '9') (ch >= '0' && ch <= '9') ch >= '0' ch '0' ch <= '9' ch '9' {
                    out.println("No");
                    return;
                } out.println("No") out.println out "No" return; if (s.charAt(a) != '-') {
                out.println("No");
                return;
            } s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' {
                out.println("No");
                return;
            } out.println("No") out.println out "No" return; for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } int i = a + 1; int i = a + 1; i a + 1 a 1 i < a + b + 1 i a + b + 1 a + b + 1 a b 1 i++ i++ i {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            } char ch = s.charAt(i); ch s.charAt(i) s.charAt s i if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                } !(ch >= '0' && ch <= '9') (ch >= '0' && ch <= '9') ch >= '0' ch '0' ch <= '9' ch '9' {
                    out.println("No");
                    return;
                } out.println("No") out.println out "No" return; out.println("Yes") out.println out "Yes" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class TaskB {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt(), b = in.nextInt();
            String s = in.next();

            for (int i = 0; i < a; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            if (s.charAt(a) != '-') {
                out.println("No");
                return;
            }

            for (int i = a + 1; i < a + b + 1; i++) {
                char ch = s.charAt(i);
                if (!(ch >= '0' && ch <= '9')) {
                    out.println("No");
                    return;
                }
            }

            out.println("Yes");

        }

    }
}

