import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String postalCode = sc.next();
		boolean okFlag = true;
		if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		}
		if (okFlag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String postalCode = sc.next();
		boolean okFlag = true;
		if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		}
		if (okFlag) {
			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 postalCode = sc.next();
		boolean okFlag = true;
		if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		}
		if (okFlag) {
			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 postalCode = sc.next();
		boolean okFlag = true;
		if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		}
		if (okFlag) {
			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 postalCode = sc.next(); postalCode sc.next() sc.next sc boolean okFlag = true; okFlag true if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		} "-".equals(String.valueOf(postalCode.charAt(a))) "-".equals "-" String.valueOf(postalCode.charAt(a)) String.valueOf String postalCode.charAt(a) postalCode.charAt postalCode a {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			} {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			} String target = String.valueOf(postalCode.charAt(i)); target String.valueOf(postalCode.charAt(i)) String.valueOf String postalCode.charAt(i) postalCode.charAt postalCode i if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				} "1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target) "9".equals(target) "8".equals(target) "7".equals(target) "6".equals(target) "5".equals(target) "4".equals(target) "3".equals(target) "1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target) "1".equals(target) "1".equals "1" target "2".equals(target) "2".equals "2" target "3".equals(target) "3".equals "3" target "4".equals(target) "4".equals "4" target "5".equals(target) "5".equals "5" target "6".equals(target) "6".equals "6" target "7".equals(target) "7".equals "7" target "8".equals(target) "8".equals "8" target "9".equals(target) "9".equals "9" target "0".equals(target) "0".equals "0" target {
				} {
					okFlag = false;
					break;
				} okFlag = false okFlag false break; for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			} int i = a + 1; int i = a + 1; i a + 1 a 1 i < a + b + 1 i a + b + 1 a + b + 1 a b 1 i++ i++ i {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			} {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			} String target = String.valueOf(postalCode.charAt(i)); target String.valueOf(postalCode.charAt(i)) String.valueOf String postalCode.charAt(i) postalCode.charAt postalCode i if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				} "1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target) "9".equals(target) "8".equals(target) "7".equals(target) "6".equals(target) "5".equals(target) "4".equals(target) "3".equals(target) "1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target) "1".equals(target) "1".equals "1" target "2".equals(target) "2".equals "2" target "3".equals(target) "3".equals "3" target "4".equals(target) "4".equals "4" target "5".equals(target) "5".equals "5" target "6".equals(target) "6".equals "6" target "7".equals(target) "7".equals "7" target "8".equals(target) "8".equals "8" target "9".equals(target) "9".equals "9" target "0".equals(target) "0".equals "0" target {
				} {
					okFlag = false;
					break;
				} okFlag = false okFlag false break; {
			okFlag = false;
		} okFlag = false okFlag false if (okFlag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} okFlag {
			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
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String postalCode = sc.next();
		boolean okFlag = true;
		if ("-".equals(String.valueOf(postalCode.charAt(a)))) {
			for (int i = 0; i < a; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}
			}
			for (int i = a + 1; i < a + b + 1 ; i++) {
				String target = String.valueOf(postalCode.charAt(i));
				if ("1".equals(target) ||  "2".equals(target) || "3".equals(target)
						|| "4".equals(target) || "5".equals(target) || "6".equals(target)
						|| "7".equals(target) || "8".equals(target) || "9".equals(target)
						|| "0".equals(target)) {
				} else {
					okFlag = false;
					break;
				}

			}
		} else {
			okFlag = false;
		}
		if (okFlag) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}