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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    } 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    } 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");
        } s.length() != a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String s1 = s.substring(0, a); s1 s.substring(0, a) s.substring s 0 a char s2 = s.charAt(a); s2 s.charAt(a) s.charAt s a String s3 = s.substring(a+1); s3 s.substring(a+1) s.substring s a+1 a 1 if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        } !s1.matches("[0-9]*") s1.matches("[0-9]*") s1.matches s1 "[0-9]*" {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if (s2 != '-') {
            System.out.println("No");
            return;
        } s2 != '-' s2 '-' {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } s3.matches("[0-9]*") s3.matches s3 "[0-9]*" {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
} 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");
        }

        String s1 = s.substring(0, a);
        char s2 = s.charAt(a);
        String s3 = s.substring(a+1);

        if (!s1.matches("[0-9]*")) {
            System.out.println("No");
            return;
        }
        if (s2 != '-') {
            System.out.println("No");
            return;
        }

        if (s3.matches("[0-9]*")) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }
}