import 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();
		String [] s = sc.next().split("");
		for(int i = 0; i < a+b+1; i++) {
			if(i < a && s[i].equals("-")) {
				System.out.println("No");
				return;
			}
			if(i > a && s[i].equals("-")) {
				System.out.println("No");
				return;
			}
		}
		if(!s[a].equals("-")) {
			System.out.println("No");
		}
		else System.out.println("Yes");
		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();
		int b = sc.nextInt();
		String [] s = sc.next().split("");
		for(int i = 0; i < a+b+1; i++) {
			if(i < a && s[i].equals("-")) {
				System.out.println("No");
				return;
			}
			if(i > a && s[i].equals("-")) {
				System.out.println("No");
				return;
			}
		}
		if(!s[a].equals("-")) {
			System.out.println("No");
		}
		else System.out.println("Yes");
		sc.close();
	}

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

} public class Main {

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

}
