import java.util.*;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	}

} Main public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	} main {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	} @SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}"; regex "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}" stdin.nextInt() "}-\\d{" "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}" "\\d{" stdin.nextInt() stdin.nextInt stdin "}-\\d{" stdin.nextInt() stdin.nextInt stdin "}" String result = "No"; result "No" if (stdin.next().matches(regex)) {
			result = "Yes";
		} stdin.next().matches(regex) stdin.next().matches stdin.next() stdin.next stdin regex {
			result = "Yes";
		} result = "Yes" result "Yes" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	}

} public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		String regex = "\\d{" + stdin.nextInt() + "}-\\d{" + stdin.nextInt() + "}";
		String result = "No";
		if (stdin.next().matches(regex)) {
			result = "Yes";
		}

		System.out.println(result);
	}

}
