import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
} Main public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	} main {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	} try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		} catch (Exception e) {
		} Exception e {
		} {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out) PrintWriter pw = new PrintWriter(System.out) new PrintWriter(System.out) String[] AB = br.readLine().split(" "); AB br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int A = Integer.parseInt(AB[0]); A Integer.parseInt(AB[0]) Integer.parseInt Integer AB[0] AB 0 int B = Integer.parseInt(AB[1]); B Integer.parseInt(AB[1]) Integer.parseInt Integer AB[1] AB 1 String[] S = br.readLine().split("-"); S br.readLine().split("-") br.readLine().split br.readLine() br.readLine br "-" if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			} S.length == AB.length && A - B == S[0].length() - S[1].length() S.length == AB.length S.length S S.length AB.length AB AB.length A - B == S[0].length() - S[1].length() A - B A B S[0].length() - S[1].length() S[0].length() S[0].length S[0] S 0 S[1].length() S[1].length S[1] S 1 {
				pw.println("Yes");
			} pw.println("Yes") pw.println pw "Yes" {
				pw.println("No");
			} pw.println("No") pw.println pw "No" pw.flush() pw.flush pw String[] args args public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
} public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
				PrintWriter pw = new PrintWriter(System.out);) {
			String[] AB = br.readLine().split(" ");
			int A = Integer.parseInt(AB[0]);
			int B = Integer.parseInt(AB[1]);
			String[] S = br.readLine().split("-");
			if (S.length == AB.length && A - B == S[0].length() - S[1].length()) {
				pw.println("Yes");
			} else {
				pw.println("No");
			}
			pw.flush();
		} catch (Exception e) {
		}
	}
}