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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			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 String S = sc.next(); S sc.next() sc.next sc boolean b = true; b true int cnt = 0; cnt 0 if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		} (S.length() == A + B + 1) && (S.charAt(A) == '-') (S.length() == A + B + 1) S.length() S.length S A + B + 1 A + B + 1 A B 1 (S.charAt(A) == '-') S.charAt(A) S.charAt S A '-' {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			} {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			} if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				} !(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-') !(S.charAt(0) == '-') (S.charAt(0) == '-') S.charAt(0) S.charAt S 0 '-' !(S.charAt(S.length() - 1) == '-') (S.charAt(S.length() - 1) == '-') S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 '-' {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					} !(S.charAt(i) == '-') (S.charAt(i) == '-') S.charAt(i) S.charAt S i '-' {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						} (S.charAt(i) < 0) || (S.charAt(i) < 10) (S.charAt(i) < 0) S.charAt(i) S.charAt S i 0 (S.charAt(i) < 10) S.charAt(i) S.charAt S i 10 {
							b = false;
						} b = false b false {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					} cnt++ cnt if (cnt != 1) {
							b = false;
							break;
						} cnt != 1 cnt 1 {
							b = false;
							break;
						} b = false b false break; {
					b = false;
					break;
				} b = false b false break; {
			b = false;
		} b = false b false if (b == true) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} b == true b true {
			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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			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();
		String S = sc.next();
		boolean b = true;
		int cnt = 0;

		if ((S.length() == A + B + 1) && (S.charAt(A) == '-')) {
			for (int i = 0; i < S.length(); i++) {
				if (!(S.charAt(0) == '-') || !(S.charAt(S.length() - 1) == '-')) {
					if (!(S.charAt(i) == '-')) {
						if ((S.charAt(i) < 0) || (S.charAt(i) < 10)) {
							b = false;
						}
					} else {
						cnt++;
						if (cnt != 1) {
							b = false;
							break;
						}
					}
				} else {
					b = false;
					break;
				}
			}
		} else {
			b = false;
		}

		if (b == true) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

	}

}
