
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		
		
		
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			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 scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {

		
		
		
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {

		
		
		
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan boolean flg = true; flg true if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		} !s.substring(0, a).matches("[0-9]{" + a + "}") s.substring(0, a).matches("[0-9]{" + a + "}") s.substring(0, a).matches s.substring(0, a) s.substring s 0 a "[0-9]{" + a + "}" "[0-9]{" + a + "}" "[0-9]{" a "}" {
			flg = false;
		} flg = false flg false if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		} !s.substring(a, a + 1).equals("-") s.substring(a, a + 1).equals("-") s.substring(a, a + 1).equals s.substring(a, a + 1) s.substring s a a + 1 a 1 "-" {
			flg = false;
		} flg = false flg false if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		} !s.substring(a + 1).matches("[0-9]{" + b + "}") s.substring(a + 1).matches("[0-9]{" + b + "}") s.substring(a + 1).matches s.substring(a + 1) s.substring s a + 1 a 1 "[0-9]{" + b + "}" "[0-9]{" + b + "}" "[0-9]{" b "}" {
			flg = false;
		} flg = false flg false if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} flg {
			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 scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {

		
		
		
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		
		
		
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		
		boolean flg = true;
		
		if (!s.substring(0, a).matches("[0-9]{" + a + "}")) {
			flg = false;
		}
		
		if (!s.substring(a, a + 1).equals("-")) {
			flg = false;
		}
		
		if (!s.substring(a + 1).matches("[0-9]{" + b + "}")) {
			flg = false;
		}
		
		if (flg) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
