import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int first = sc.nextInt();
	int second = sc.nextInt();
	String str = sc.next();
	if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	}
	System.out.println("Yes");
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int first = sc.nextInt();
	int second = sc.nextInt();
	String str = sc.next();
	if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	}
	System.out.println("Yes");
    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int first = sc.nextInt();
	int second = sc.nextInt();
	String str = sc.next();
	if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	}
	System.out.println("Yes");
    } main {
	Scanner sc = new Scanner(System.in);
	int first = sc.nextInt();
	int second = sc.nextInt();
	String str = sc.next();
	if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	}
	System.out.println("Yes");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int first = sc.nextInt(); first sc.nextInt() sc.nextInt sc int second = sc.nextInt(); second sc.nextInt() sc.nextInt sc String str = sc.next(); str sc.next() sc.next sc if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	} str.length()!=(first+second+1) str.length() str.length str (first+second+1) first+second+1 first second 1 {
	    System.out.println("No");
	    return;
	} System.out.println("No") System.out.println System.out System System.out "No" return; for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	} int i = 0; int i = 0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	} {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	} char c = str.charAt(i); c str.charAt(i) str.charAt str i if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    } i==first i first {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    } if(c!='-') {
		    System.out.println("No");
		    return;
		} c!='-' c '-' {
		    System.out.println("No");
		    return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    } if(c=='-') {
		    System.out.println("No");
		    return;
		} c=='-' c '-' {
		    System.out.println("No");
		    return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int first = sc.nextInt();
	int second = sc.nextInt();
	String str = sc.next();
	if(str.length()!=(first+second+1)) {
	    System.out.println("No");
	    return;
	}
	for(int i = 0; i<str.length(); i++) {
	    char c = str.charAt(i);
	    if(i==first) {
		if(c!='-') {
		    System.out.println("No");
		    return;
		}
	    }else {
		if(c=='-') {
		    System.out.println("No");
		    return;
		}
	    }
	}
	System.out.println("Yes");
    }
}