import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	}
} Main public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		} {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No") System.out.println System.out System System.out s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No" s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") s.matches s "[0-9]{" + a + "}-[0-9]{" + b + "}" b "}-[0-9]{" "[0-9]{" + a + "}-[0-9]{" + b + "}" "[0-9]{" a "}-[0-9]{" b "}" "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	}
} public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int a = scanner.nextInt(), b = scanner.nextInt();
			String s = scanner.next();
			System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
		}
	}
}
