
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.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 import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int M = Integer.parseInt(st.nextToken()); M Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st int N = Integer.parseInt(st.nextToken()); N Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N); regex String.format("[0-9]{%d}-[0-9]{%d}",M,N) String.format String "[0-9]{%d}-[0-9]{%d}" M N Pattern p = Pattern.compile(regex); p Pattern.compile(regex) Pattern.compile Pattern regex String input = br.readLine(); input br.readLine() br.readLine br Matcher q = p.matcher(input); q p.matcher(input) p.matcher p input if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} q.matches() q.matches q {
			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) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

} Main

import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int M = Integer.parseInt(st.nextToken());
		int N = Integer.parseInt(st.nextToken());
		String regex = String.format("[0-9]{%d}-[0-9]{%d}",M,N);		
		Pattern p = Pattern.compile(regex);
		String input = br.readLine();
		Matcher q = p.matcher(input);
		if(q.matches()) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}

}
