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();

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    }

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

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    } 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 char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean result = true; result true for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        } {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        } if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } i < a i a {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } if (s[i] < '0' || s[i] > '9') {
                    result = false;
                } s[i] < '0' || s[i] > '9' s[i] < '0' s[i] s i '0' s[i] > '9' s[i] s i '9' {
                    result = false;
                } result = false result false if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } i == a i a {
                if (s[i] != '-') {
                    result = false;
                }
            } if (s[i] != '-') {
                    result = false;
                } s[i] != '-' s[i] s i '-' {
                    result = false;
                } result = false result false {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } if (s[i] < '0' || s[i] > '9') {
                    result = false;
                } s[i] < '0' || s[i] > '9' s[i] < '0' s[i] s i '0' s[i] > '9' s[i] s i '9' {
                    result = false;
                } result = false result false String ans; ans if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        } result {
            ans = "Yes";
        } ans = "Yes" ans "Yes" {
            ans = "No";
        } ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans 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();

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    }

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

        char[] s = sc.next().toCharArray();
        boolean result = true;
        for (int i = 0; i < s.length; i++) {
            if (i < a) {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            } else if (i == a){
                if (s[i] != '-') {
                    result = false;
                }
            } else {
                if (s[i] < '0' || s[i] > '9') {
                    result = false;
                }
            }
        }
        String ans;
        if (result) {
            ans = "Yes";
        } else {
            ans = "No";
        }


        System.out.println(ans);
    }

}
