import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	}
} import java.util.Scanner; Scanner 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();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("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 boolean ans = true; ans true String s = sc.next(); s sc.next() sc.next sc char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		} int i = 0; int i = 0; i 0 i <= s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		} {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		} if (i == a && c[i] != '-') {
				ans = false;

			} i == a && c[i] != '-' i == a i a c[i] != '-' c[i] c i '-' {
				ans = false;

			} ans = false ans false if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			} i != a i a {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			} if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				} c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9' c[i] != '8' c[i] != '7' c[i] != '6' c[i] != '5' c[i] != '4' c[i] != '3' c[i] != '2' c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9' c[i] != '0' c[i] c i '0' c[i] != '1' c[i] c i '1' c[i] != '2' c[i] c i '2' c[i] != '3' c[i] c i '3' c[i] != '4' c[i] c i '4' c[i] != '5' c[i] c i '5' c[i] != '6' c[i] c i '6' c[i] != '7' c[i] c i '7' c[i] != '8' c[i] c i '8' c[i] != '9' c[i] c i '9' {
					ans = false;
				} ans = false ans false if(s.length()!=a+b+1){
			ans=false;
		} s.length()!=a+b+1 s.length() s.length s a+b+1 a+b+1 a b 1 {
			ans=false;
		} ans=false ans false if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
} ans {
	System.out.println("Yes");
} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
	System.out.println("No");
} System.out.println("No") System.out.println System.out System System.out "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();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
		for (int i = 0; i <= s.length() - 1; i++) {
			if (i == a && c[i] != '-') {
				ans = false;

			}

			if (i != a) {
				if (c[i] != '0' && c[i] != '1' && c[i] != '2' && c[i] != '3'
						&& c[i] != '4' && c[i] != '5' && c[i] != '6'
						&& c[i] != '7' && c[i] != '8' && c[i] != '9') {
					ans = false;
				}
			}
		}
		if(s.length()!=a+b+1){
			ans=false;
		}

if(ans){
	System.out.println("Yes");
}else{
	System.out.println("No");
}
	}
}