import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } main {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}; nums {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'} '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' HashSet<Character> hashSet = new HashSet<>(); hashSet new HashSet<>() for(char c: nums){
            hashSet.add(c);
        } char c nums {
            hashSet.add(c);
        } {
            hashSet.add(c);
        } hashSet.add(c) hashSet.add hashSet c String str = scanner.next(); str scanner.next() scanner.next scanner for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        } {
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        } if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            } i != A i A {
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            } if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                } !hashSet.contains(str.charAt(i)) hashSet.contains(str.charAt(i)) hashSet.contains hashSet str.charAt(i) str.charAt str i {
                    System.out.println("No");
                    return;
                } System.out.println("No") System.out.println System.out System System.out "No" return; {
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            } if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                } str.charAt(i) != '-' str.charAt(i) str.charAt str i '-' {
                    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) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A = scanner.nextInt();
        int B = scanner.nextInt();

        char[] nums = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
        HashSet<Character> hashSet = new HashSet<>();
        for(char c: nums){
            hashSet.add(c);
        }

        String str = scanner.next();

        for(int i=0; i<str.length(); i++){
            if(i != A){
                if(!hashSet.contains(str.charAt(i))){
                    System.out.println("No");
                    return;
                }
            }else{
                if(str.charAt(i) != '-'){
                    System.out.println("No");
                    return;
                }
            }
        }
        System.out.println("Yes");
    }
}
