import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    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) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    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[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    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[] ary = sc.next().split(""); ary sc.next().split("") sc.next().split sc.next() sc.next sc "" if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        } !ary[A].equals("-") ary[A].equals("-") ary[A].equals ary[A] ary A "-" {
            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(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        } ary.length != (A + B + 1) ary.length ary ary.length (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 < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } {
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        } if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            } i != A i A {
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            } if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                } !ary[i].matches("[0-9]") ary[i].matches("[0-9]") ary[i].matches ary[i] ary i "[0-9]" {
                    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) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String[] ary = sc.next().split("");
        if(!ary[A].equals("-")){
            System.out.println("No");
            System.exit(0);
        }else if(ary.length != (A + B + 1)){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i < ary.length; i++){
            if(i != A){
                if(!ary[i].matches("[0-9]")){
                    System.out.println("No");
                    System.exit(0);
                }
            }
        }
        System.out.println("Yes");
    }
}