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();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		}
} 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();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		}
} Main public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		} main {
			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		} 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 sc.nextLine() sc.nextLine sc String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String regex = "^[0-9]{%d}-[0-9]{%d}$"; regex "^[0-9]{%d}-[0-9]{%d}$" regex = String.format(regex, a, b) regex String.format(regex, a, b) String.format String regex a b if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			} s.matches(regex) s.matches s regex {
				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" sc.close() sc.close sc 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();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		}
} public class Main {

public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);
			int a = sc.nextInt();
			int b = sc.nextInt();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		}
} 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();
			sc.nextLine();
			String s = sc.nextLine();

			String regex = "^[0-9]{%d}-[0-9]{%d}$";
			regex = String.format(regex, a, b);

			if (s.matches(regex)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}

			sc.close();
		}
}