import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        } s.length() != a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 {
            System.out.println("No");
            System.exit(0);
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } int i = 0 ; int i = 0 ; i 0 i <= a + b i a + b a b i++ i++ i {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            } i == a i a {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                } s.charAt(i) != '-' s.charAt(i) s.charAt s i '-' {
                    System.out.println("No");
                    System.exit(0);
                } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            } if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                } !Character.isDigit(s.charAt(i)) Character.isDigit(s.charAt(i)) Character.isDigit Character s.charAt(i) s.charAt s i {
                    System.out.println("No");
                    System.exit(0);
                } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 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) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        if (s.length() != a + b + 1) {
            System.out.println("No");
            System.exit(0);
        }
        for (int i = 0 ; i <= a + b ; i++) {
            if (i == a) {
                if (s.charAt(i) != '-') {
                    System.out.println("No");
                    System.exit(0);
                }
            } else {
                if (!Character.isDigit(s.charAt(i))) {
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
}