
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	}

	private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	}

	private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	} main {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	} new Main().solveB() new Main().solveB new Main() String[] args args private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveA {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numM = 0; numM 0 try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numM = scanner.nextInt() numM scanner.nextInt() scanner.nextInt scanner System.out.println(24 + 24 - numM) System.out.println System.out System System.out 24 + 24 - numM 24 + 24 24 24 numM private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	} solveB {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	} Scanner scanner = null; scanner null int numA = 0; numA 0 int numB = 0; numB 0 String s = ""; s "" try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numA = scanner.nextInt() numA scanner.nextInt() scanner.nextInt scanner numB = scanner.nextInt() numB scanner.nextInt() scanner.nextInt scanner s = scanner.next() s scanner.next() scanner.next scanner try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			} NumberFormatException e {
				//				e.printStackTrace();
			} {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} String wkA = s.substring(0, numA); wkA s.substring(0, numA) s.substring s 0 numA String wkB = s.substring(numA + 1, s.length()); wkB s.substring(numA + 1, s.length()) s.substring s numA + 1 numA 1 s.length() s.length s Integer.parseInt(wkA) Integer.parseInt Integer wkA Integer.parseInt(wkB) Integer.parseInt Integer wkB if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				} numA + numB + 1 == s.length() numA + numB + 1 numA + numB + 1 numA numB 1 s.length() s.length s {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				} String wk = s.substring(numA, numA + 1); wk s.substring(numA, numA + 1) s.substring s numA numA + 1 numA 1 if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					} wk.equals("-") wk.equals wk "-" {
						System.out.println("Yes");
						return;
					} System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "No" private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveC {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 int numK = 0; numK 0 int numS = 0; numS 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner System.out.println("") System.out.println System.out System System.out "" private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} solveD {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	} Scanner scanner = null; scanner null int numN = 0; numN 0 int numK = 0; numK 0 int numS = 0; numS 0 try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		} {
			if (scanner != null) {
				scanner.close();
			}
		} if (scanner != null) {
				scanner.close();
			} scanner != null scanner null {
				scanner.close();
			} scanner.close() scanner.close scanner {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} scanner = new Scanner(System.in) scanner new Scanner(System.in) numN = scanner.nextInt() numN scanner.nextInt() scanner.nextInt scanner System.out.println("") System.out.println System.out System System.out "" public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	}

	private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	}

	private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		//		new Main().solveA();
		new Main().solveB();
		// new Main().solveC();
		// new Main().solveD();
	}

	private void solveA() {
		Scanner scanner = null;
		int numM = 0;

		try {
			scanner = new Scanner(System.in);
			numM = scanner.nextInt();

			System.out.println(24 + 24 - numM);

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveB() {
		Scanner scanner = null;
		int numA = 0;
		int numB = 0;
		String s = "";

		try {
			scanner = new Scanner(System.in);
			numA = scanner.nextInt();
			numB = scanner.nextInt();
			s = scanner.next();
			try {
				String wkA = s.substring(0, numA);
				String wkB = s.substring(numA + 1, s.length());
				Integer.parseInt(wkA);
				Integer.parseInt(wkB);

				if (numA + numB + 1 == s.length()) {
					String wk = s.substring(numA, numA + 1);
					if (wk.equals("-")) {
						System.out.println("Yes");
						return;
					}
				}
			} catch (NumberFormatException e) {
				//				e.printStackTrace();
			}

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
		System.out.println("No");
	}

	private void solveC() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}

	private void solveD() {
		Scanner scanner = null;
		int numN = 0;
		int numK = 0;
		int numS = 0;

		try {
			scanner = new Scanner(System.in);
			numN = scanner.nextInt();

			System.out.println("");

		} finally {
			if (scanner != null) {
				scanner.close();
			}
		}
	}
}