import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			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 s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int A = s.nextInt(); A s.nextInt() s.nextInt s int B = s.nextInt(); B s.nextInt() s.nextInt s String str = s.next(); str s.next() s.next s if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}") str.matches str "[0-9]" + "{" + A + "}-[0-9]{" + B + "}" B "}-[0-9]{" A "[0-9]" + "{" + A + "}-[0-9]{" + B + "}" "[0-9]" "{" A "}-[0-9]{" B "}" {
			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 s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		String str = s.next();

		if (str.matches("[0-9]" + "{" + A + "}-[0-9]{" + B + "}")) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
