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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    }
} 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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    }
} 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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    } main {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt();
    	int B = sc.nextInt();
    	String S = sc.next();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "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 key = true; key true for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	} {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	} if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		} i == A i A {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} if (S.charAt(i) != '-') {
    				key = false;
    			} S.charAt(i) != '-' S.charAt(i) S.charAt S i '-' {
    				key = false;
    			} key = false key false {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		} if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			} !S.substring(i, i+1).matches("[0-9]") S.substring(i, i+1).matches("[0-9]") S.substring(i, i+1).matches S.substring(i, i+1) S.substring S i i+1 i 1 "[0-9]" {
    				key = false;
    			} key = false key false System.out.println(key ? "Yes" : "No") System.out.println System.out System System.out key ? "Yes" : "No" key "Yes" "No" 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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    }
} 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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    }
} 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();
    	boolean key = true;
    	for (int i = 0; i < S.length(); i++) {
    		if (i == A) {
    			if (S.charAt(i) != '-') {
    				key = false;
    			}
    		} else {
    			if (!S.substring(i, i+1).matches("[0-9]")) {
    				key = false;
    			}
    		}
    	}
    	System.out.println(key ? "Yes" : "No");
    }
}