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();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    }
} 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();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    }
} Main public static void main(String[] args) throws Exception {
       Scanner sc = new Scanner(System.in);
       int A = sc.nextInt();
       int B = sc.nextInt();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    } main {
       Scanner sc = new Scanner(System.in);
       int A = sc.nextInt();
       int B = sc.nextInt();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    } 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 int len = A + B + 1; len A + B + 1 A + B + 1 A B 1 int hit = A; hit A String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String []array = line.split(""); array line.split("") line.split line "" String SS = array[A]; SS array[A] array A if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       } (array.length == len) && SS.equals("-") (array.length == len) array.length array array.length len SS.equals("-") SS.equals SS "-" {
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       } for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           } {
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           } String m = array[i]; m array[i] array i if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                } (!m.matches("^[0-9]+$")) && i != A (!m.matches("^[0-9]+$")) m.matches("^[0-9]+$") m.matches m "^[0-9]+$" i != A i 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 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.exit(0) System.exit System 0 {
           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 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();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    }
} 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();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    }
} 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();
       int len = A + B + 1;
       int hit = A;
       String s = sc.nextLine();
       String line = sc.nextLine();
       String []array = line.split("");
       String SS = array[A];
       
       if((array.length == len) && SS.equals("-")){
           for(int i = 0; i < array.length; i++){
               String m = array[i];
               if((!m.matches("^[0-9]+$")) && i != A){
                    System.out.println("No");
                    System.exit(0); 
                }
           }
           System.out.println("Yes");
           System.exit(0);
       }else{
           System.out.println("No");
           System.exit(0);
       }
    }
}
