import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt(); b sc.nextInt() sc.nextInt sc char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int c = 0; c 0 if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		} s[a] == '-' s[a] s a '-' {
			c++;
		} c++ c {
			c = 0;
		} c = 0 c 0 for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		} {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		} if (i != a && s[i] == '-') {
				c = 0;
			} i != a && s[i] == '-' i != a i a s[i] == '-' s[i] s i '-' {
				c = 0;
			} c = 0 c 0 if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} c != 0 c 0 {
			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" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		int c = 0;
		if (s[a] == '-') {
			c++;
		} else {
			c = 0;
		}
		for (int i = 0; i < s.length; i++) {
			if (i != a && s[i] == '-') {
				c = 0;
			}
		}
		if (c != 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		sc.close();
	}

}
