import java.lang.reflect.Array;
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();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        System.out.println(ans);
    }
} import java.lang.reflect.Array; Array java.lang.reflect 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();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        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();
        String s = sc.next();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

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

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        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 String s = sc.next(); s sc.next() sc.next sc Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; numbers {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' List<Character> numList = Arrays.asList(numbers); numList Arrays.asList(numbers) Arrays.asList Arrays numbers String ans = "Yes"; ans "Yes" for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        } {
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            } i == a i a {
                if(c != '-'){
                    ans = "No";
                    break;
                }
            } if(c != '-'){
                    ans = "No";
                    break;
                } c != '-' c '-' {
                    ans = "No";
                    break;
                } ans = "No" ans "No" break; if(!numList.contains(c)){
                ans = "No";
                break;
            } !numList.contains(c) numList.contains(c) numList.contains numList c {
                ans = "No";
                break;
            } ans = "No" ans "No" break; 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();
        String s = sc.next();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        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();
        String s = sc.next();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        System.out.println(ans);
    }
} Main
import java.lang.reflect.Array;
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();

        Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
        List<Character> numList = Arrays.asList(numbers);
        String ans = "Yes";
        for(int i = 0; i < s.length(); i++){
            char c = s.charAt(i);
            if(i == a){
                if(c != '-'){
                    ans = "No";
                    break;
                }
            }else if(!numList.contains(c)){
                ans = "No";
                break;
            }
        }

        System.out.println(ans);
    }
}