import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	} main {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		final int a = sc.nextInt();
		final int b = sc.nextInt();
		final String s = sc.next();

		final String matchpattern = "[0-9]{" + a + "}-[0-9]{" + b + "}";

		System.out.println(s.matches(matchpattern) ? "Yes" : "No");

	}

}
