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