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 S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}
     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 S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main public static void main(String[] args) throws Exception {
    
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    String S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    String S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } 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 if (S.length() != A + B + 1){
      System.out.println("No");
    } S.length() != A + B + 1 S.length() S.length S A + B + 1 A + B + 1 A B 1 {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" String case1 = S.substring(0, A); case1 S.substring(0, A) S.substring S 0 A char case2 = S.charAt(A); case2 S.charAt(A) S.charAt S A String case3 = S.substring(A+1); case3 S.substring(A+1) S.substring S A+1 A 1 if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    } !case1.matches("[0-9]*") case1.matches("[0-9]*") case1.matches case1 "[0-9]*" {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; if (case2 != '-') {
      System.out.println("No");
      return;
    } case2 != '-' case2 '-' {
      System.out.println("No");
      return;
    } System.out.println("No") System.out.println System.out System System.out "No" return; if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } case3.matches("[0-9]*") case3.matches case3 "[0-9]*" {
      System.out.println("Yes");
    } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" 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 S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} 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 S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} 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 S = sc.next();
    if (S.length() != A + B + 1){
      System.out.println("No");
    }
    String case1 = S.substring(0, A);
    char case2 = S.charAt(A);
    String case3 = S.substring(A+1);
 
    if (!case1.matches("[0-9]*")) {
      System.out.println("No");
      return;
    }
    if (case2 != '-') {
      System.out.println("No");
      return;
    }
    if (case3.matches("[0-9]*")) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}
    