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();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
} 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();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	} 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 String s = sc.next(); s sc.next() sc.next sc String p[] = s.split("-", 0); p s.split("-", 0) s.split s "-" 0 if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No"); p.length != 2 || p[0].length() != a || p[1].length() != b p.length != 2 || p[0].length() != a || p[1].length() != b p.length != 2 p.length p p.length 2 p[0].length() != a p[0].length() p[0].length p[0] p 0 a p[1].length() != b p[1].length() p[1].length p[1] p 1 b System.out.println("No") System.out.println System.out System System.out "No" if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No"); isNumber(p[0]) && isNumber(p[1]) isNumber(p[0]) isNumber p[0] p 0 isNumber(p[1]) isNumber p[1] p 1 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	} isNumber {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	} try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		} catch (NumberFormatException e) {
			return false;
		} NumberFormatException e {
			return false;
		} return false; false {
			Integer.parseInt(str);
			return true;
		} Integer.parseInt(str) Integer.parseInt Integer str return true; true String str str public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
} 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();
		String s = sc.next();
		String p[] = s.split("-", 0);
		if (p.length != 2 || p[0].length() != a || p[1].length() != b)
			System.out.println("No");
		else if (isNumber(p[0]) && isNumber(p[1]))
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	public static boolean isNumber(String str) {
		try {
			Integer.parseInt(str);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
}