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 code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	}

	public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	}
} 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 code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	}

	public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	} 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 code = sc.next(); code sc.next() sc.next sc System.out.println(isCorrectPostalCode(code, A, B)) System.out.println System.out System System.out isCorrectPostalCode(code, A, B) isCorrectPostalCode code A B String[] args args public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	} isCorrectPostalCode {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	} char[] codes = code.toCharArray(); codes code.toCharArray() code.toCharArray code if (codes[A] != '-') {
			return "No";
		} codes[A] != '-' codes[A] codes A '-' {
			return "No";
		} return "No"; "No" String[] postalCodeList = code.split("-", 0); postalCodeList code.split("-", 0) code.split code "-" 0 if (postalCodeList.length != 2) {
			return "No";
		} postalCodeList.length != 2 postalCodeList.length postalCodeList postalCodeList.length 2 {
			return "No";
		} return "No"; "No" if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		} postalCodeList[0].length() != A || postalCodeList[1].length() != B postalCodeList[0].length() != A postalCodeList[0].length() postalCodeList[0].length postalCodeList[0] postalCodeList 0 A postalCodeList[1].length() != B postalCodeList[1].length() postalCodeList[1].length postalCodeList[1] postalCodeList 1 B {
			return "No";
		} return "No"; "No" return "Yes"; "Yes" String code code int A A int B B public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	}

	public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	}
} public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	}

	public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	}
} 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 code = sc.next();

		System.out.println(isCorrectPostalCode(code, A, B));

	}

	public static String isCorrectPostalCode(String code, int A, int B) {

		char[] codes = code.toCharArray();
		if (codes[A] != '-') {
			return "No";
		}

		String[] postalCodeList = code.split("-", 0);
		if (postalCodeList.length != 2) {
			return "No";
		}
		if (postalCodeList[0].length() != A || postalCodeList[1].length() != B) {
			return "No";
		}

		return "Yes";
	}
}
