import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	} main {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	} Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int A=scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B=scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner String s=scanner.next(); s scanner.next() scanner.next scanner int i=0; i 0 for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		} i = 0; i = 0 i 0 i < A+B+1 i A+B+1 A+B+1 A B 1 i++ i++ i {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		} {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		} char c=s.charAt(i); c s.charAt(i) s.charAt s i if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			} c>=48&&c<=57&&i!=A c>=48&&c<=57&&i!=A c>=48 c 48 c<=57 c 57 i!=A i A {
				continue;
			} continue; if(i==A&&c=='-'){
				continue;
			}else {
				break;
			} i==A&&c=='-' i==A i A c=='-' c '-' {
				continue;
			} continue; {
				break;
			} break; if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		} i!=A+B+1 i A+B+1 A+B+1 A B 1 {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int A=scanner.nextInt();
		int B=scanner.nextInt();
		String s=scanner.next();
		int i=0;
		for (i = 0; i < A+B+1; i++) {
			char c=s.charAt(i);
			if (c>=48&&c<=57&&i!=A) {
				continue;
			}else if(i==A&&c=='-'){
				continue;
			}else {
				break;
			}
		}
		if (i!=A+B+1) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
	}
}