import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.length()!=a+b+1)check=1;
		else {
			for(int i=0;i<a+b+1;i++) {
				if(s.charAt(i)=='-' &&i!=a  || i==a && s.charAt(i)!='-') {
					check=1;
					break;
				}
			}
		}
		System.out.println((check==1)? "No":"Yes");
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.length()!=a+b+1)check=1;
		else {
			for(int i=0;i<a+b+1;i++) {
				if(s.charAt(i)=='-' &&i!=a  || i==a && s.charAt(i)!='-') {
					check=1;
					break;
				}
			}
		}
		System.out.println((check==1)? "No":"Yes");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.length()!=a+b+1)check=1;
		else {
			for(int i=0;i<a+b+1;i++) {
				if(s.charAt(i)=='-' &&i!=a  || i==a && s.charAt(i)!='-') {
					check=1;
					break;
				}
			}
		}
		System.out.println((check==1)? "No":"Yes");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		String s = scan.next();
		scan.close();
		int check=0;
		if(s.length()!=a+b+1)check=1;
		else {
			for(int i=0;i<a+b+1;i++) {
				if(s.charAt(i)=='-' &&i!=a  || i==a && s.charAt(i)!='-') {
					check=1;
					break;
				}
			}
		}
		System.out.println((check==1)? "No":"Yes");
	}
}