import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan char[] c = new char[s.length()]; c new char[s.length()] s.length() s.length s for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			c[i] = s.charAt(i);
		} {
			c[i] = s.charAt(i);
		} c[i] = s.charAt(i) c[i] c i s.charAt(i) s.charAt s i boolean f = true; f true if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		} c[a] == '-' c[a] c a '-' {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		} for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
				if (c[i] == '-') {
					f = false;
				}
			} {
				if (c[i] == '-') {
					f = false;
				}
			} if (c[i] == '-') {
					f = false;
				} c[i] == '-' c[i] c i '-' {
					f = false;
				} f = false f false for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			} int i = a+1; int i = a+1; i a+1 a 1 i <= a+b i a+b a b i++ i++ i {
				if (c[i] == '-') {
					f = false;
				}
			} {
				if (c[i] == '-') {
					f = false;
				}
			} if (c[i] == '-') {
					f = false;
				} c[i] == '-' c[i] c i '-' {
					f = false;
				} f = false f false {
			f = false;
		} f = false f false if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} f {
			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 scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		char[] c = new char[s.length()];
		for (int i = 0; i < s.length(); i++) {
			c[i] = s.charAt(i);
		}
		boolean f = true;
		if (c[a] == '-') {
			for (int i = 0; i < a; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
			for (int i = a+1; i <= a+b; i++) {
				if (c[i] == '-') {
					f = false;
				}
			}
		}
		else {
			f = false;
		}
		if (f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
