import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} Main public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    } try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        } {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int A = Integer.parseInt(in.next()); A Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int B = Integer.parseInt(in.next()); B Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in String S = in.next(); S in.next() in.next in for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                } c >= '0' && c <= '9' c >= '0' c '0' c <= '9' c '9' {
                } {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            } int i = A; int i = A; i A i < A + 1 i A + 1 A 1 i++ i++ i {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            } {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (c != '-') {
                    System.out.println("No");
                    return;
                } c != '-' c '-' {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } int i = A + 1; int i = A + 1; i A + 1 A 1 i < A + 1 + B i A + 1 + B A + 1 + B A 1 B i++ i++ i {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            } char c = S.charAt(i); c S.charAt(i) S.charAt S i if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                } c >= '0' && c <= '9' c >= '0' c '0' c <= '9' c '9' {
                } {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String args[] args public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int A = Integer.parseInt(in.next());
            int B = Integer.parseInt(in.next());
            String S = in.next();

            for (int i = 0; i < A; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A; i < A + 1; i++) {
                char c = S.charAt(i);
                if (c != '-') {
                    System.out.println("No");
                    return;
                }
            }
            for (int i = A + 1; i < A + 1 + B; i++) {
                char c = S.charAt(i);
                if (c >= '0' && c <= '9') {
                } else {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
}
