import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	} main {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	} 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 int length = a+b+1; length a+b+1 a+b+1 a b 1 String post = sc.next(); post sc.next() sc.next sc char c = post.charAt(a); c post.charAt(a) post.charAt post a String start = post.substring(0,a); start post.substring(0,a) post.substring post 0 a String end = post.substring(a+1,post.length()); end post.substring(a+1,post.length()) post.substring post a+1 a 1 post.length() post.length post String ans = ""; ans "" if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		} post.length() == length post.length() post.length post length {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		} if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			} c == '-' c '-' {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			} if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				} start.contains("-") || end.contains("-") start.contains("-") start.contains start "-" end.contains("-") end.contains end "-" {
					ans = "No";
				} ans = "No" ans "No" {
				ans = "Yes";
				} ans = "Yes" ans "Yes" {
				ans = "No";
			} ans = "No" ans "No" {
			ans = "No";
		} ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans 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();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int length = a+b+1;
		String post = sc.next();
		char c = post.charAt(a);
		String start = post.substring(0,a);
		String end = post.substring(a+1,post.length());

		String ans = "";
		if(post.length() == length) {
			if(c == '-') {
				if(start.contains("-") || end.contains("-")) {
					ans = "No";
				}else {
				ans = "Yes";
				}
			}else {
				ans = "No";
			}
		}else {
			ans = "No";
		}
		System.out.println(ans);

	}
}
