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 str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       if (m.find()) {
            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 str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       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 a = sc.nextInt();
      	int b = sc.nextInt();
      	//ハイフン入り
        String str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       if (m.find()) {
            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 str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       if (m.find()) {
            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 str = sc.next(); str 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(str); m p.matcher(str) p.matcher p str 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 a = sc.nextInt();
      	int b = sc.nextInt();
      	//ハイフン入り
        String str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       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 a = sc.nextInt();
      	int b = sc.nextInt();
      	//ハイフン入り
        String str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       if (m.find()) {
            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 str = sc.next();
      	//正規表現のパターンを作成
      	Pattern p = Pattern.compile("[0-9]{"+a+"}-[0-9]{"+b+"}");
      	Matcher m = p.matcher(str);
       if (m.find()) {
            System.out.println("Yes");
        }
		else{
			System.out.println("No");
    	}
        }
}