import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  } main {
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] S = sc.nextLine().split(" "); S sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int A = Integer.parseInt(S[0]); A Integer.parseInt(S[0]) Integer.parseInt Integer S[0] S 0 int B = Integer.parseInt(S[1]); B Integer.parseInt(S[1]) Integer.parseInt Integer S[1] S 1 String T = sc.nextLine(); T sc.nextLine() sc.nextLine sc System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No") System.out.println System.out System System.out T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No" T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") T.matches T "[0-9]{"+A+"}-[0-9]{"+B+"}" B "}-[0-9]{" "[0-9]{"+A+"}-[0-9]{"+B+"}" "[0-9]{" A "}-[0-9]{" B "}" "Yes" "No" String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  }
} Main
import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int A = Integer.parseInt(S[0]);
    int B = Integer.parseInt(S[1]);
    String T = sc.nextLine();
    
    System.out.println(T.matches("[0-9]{"+A+"}-[0-9]{"+B+"}") ? "Yes" : "No");
  }
}