import java.io.*;

public class Main{
	public static void main(String[] args){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
} import java.io.*; io.* java public class Main{
	public static void main(String[] args){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	} main {
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	} try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		} catch(IOException e){
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		} BufferedReader br = new BufferedReader( new InputStreamReader(System.in)) BufferedReader br = new BufferedReader( new InputStreamReader(System.in)) new BufferedReader( new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int A = Integer.parseInt(str[0]); A Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int B = Integer.parseInt(str[1]); B Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 String postalCode = br.readLine(); postalCode br.readLine() br.readLine br String reg = "\\d{" + A + "}-\\d{" + B + "}"; reg "\\d{" + A + "}-\\d{" + B + "}" B "}-\\d{" "\\d{" + A + "}-\\d{" + B + "}" "\\d{" A "}-\\d{" B "}" if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			} postalCode.matches(reg) postalCode.matches postalCode reg {
				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){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
} public class Main{
	public static void main(String[] args){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
} Main
import java.io.*;

public class Main{
	public static void main(String[] args){
		
		try(
		BufferedReader br = new BufferedReader( new InputStreamReader(System.in));
		){
			String[] str = br.readLine().split(" ");
			int A = Integer.parseInt(str[0]);
			int B = Integer.parseInt(str[1]);
			
			String postalCode = br.readLine();
			
			String reg = "\\d{" + A + "}-\\d{" + B + "}";
			if(postalCode.matches(reg)){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
}
