import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
}
} Main public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
} main {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
} 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 str=scan.next(); str scan.next() scan.next scan boolean fig=true; fig true for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	} 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 {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	} {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	} char ch=str.charAt(i); ch str.charAt(i) str.charAt str i if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		} i==a i a {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		} if(ch=='-') {
			}
			else {
				fig=false;
			} ch=='-' ch '-' {
			} {
				fig=false;
			} fig=false fig false {
			if(ch=='-') {
				fig=false;
			}
		} if(ch=='-') {
				fig=false;
			} ch=='-' ch '-' {
				fig=false;
			} fig=false fig false System.out.println(fig?"Yes":"No") System.out.println System.out System System.out fig?"Yes":"No" fig "Yes" "No" scan.close() scan.close scan String[]srgs srgs public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
}
} public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	int a=scan.nextInt();
	int b=scan.nextInt();
	String str=scan.next();
	boolean fig=true;
	for(int i=0;i!=a+b+1;i++) {
		char ch=str.charAt(i);
		if(i==a) {
			if(ch=='-') {
			}
			else {
				fig=false;
			}
		}
		else {
			if(ch=='-') {
				fig=false;
			}
		}
	}
	System.out.println(fig?"Yes":"No");
	scan.close();
}
}