import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex import java.util.regex.Matcher; Matcher java.util.regex public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} Main public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        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();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        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 Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$"); p Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$") Pattern.compile Pattern "^[0-9]{"+A+"}-[0-9]{"+B+"}$" B "}-[0-9]{" "^[0-9]{"+A+"}-[0-9]{"+B+"}$" "^[0-9]{" A "}-[0-9]{" B "}$" Matcher m = p.matcher(S); m p.matcher(S) p.matcher p S if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      } m.matches() m.matches m {
        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){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
} Main
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main(String[] args){
       Scanner sc = new Scanner(System.in);   
      //取得
	  int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      
      Pattern p = Pattern.compile("^[0-9]{"+A+"}-[0-9]{"+B+"}$");
      Matcher m = p.matcher(S);
      
      if(m.matches()){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
}