import java.util.Scanner;
public class Main{
	public static void main(String args[])throws Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			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[])throws Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main public static void main(String args[])throws Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	} 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 String S = sc.next(); S sc.next() sc.next sc Boolean flag = true; flag true 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);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		} 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);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		} {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		} C[i] = S.charAt(i) C[i] C i S.charAt(i) S.charAt S i if(i == A && C[i] != '-') {
				flag = false;
			} i == A && C[i] != '-' i == A i A C[i] != '-' C[i] C i '-' {
				flag = false;
			} flag = false flag false if(i != A && C[i] == '-') {
				flag = false;
			} i != A && C[i] == '-' i != A i A C[i] == '-' C[i] C i '-' {
				flag = false;
			} flag = false flag false if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} flag {
			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 Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} public class Main{
	public static void main(String args[])throws Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;
public class Main{
	public static void main(String args[])throws Exception{
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		Boolean flag = true;
		char[] C = new char[S.length()];
		for(int i=0;i<S.length();i++) {
			C[i] = S.charAt(i);
			if(i == A && C[i] != '-') {
				flag = false;
			}
			if(i != A && C[i] == '-') {
				flag = false;
			}
		}
		if(flag) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}