import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	} main {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a = in.nextInt(); a in.nextInt() in.nextInt in int b = in.nextInt(); b in.nextInt() in.nextInt in in.nextLine() in.nextLine in String s = in.nextLine(); s in.nextLine() in.nextLine in String ans = "No"; ans "No" if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		} s.contains("-") s.contains s "-" {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		} String[] arr = s.split("-"); arr s.split("-") s.split s "-" if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			} arr.length == 2 arr.length arr arr.length 2 {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			} if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes"; arr[0].length() == a && arr[1].length() == b arr[0].length() == a arr[0].length() arr[0].length arr[0] arr 0 a arr[1].length() == b arr[1].length() arr[1].length arr[1] arr 1 b ans = "Yes" ans "Yes" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	}

} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int b = in.nextInt(); in.nextLine();
		String s = in.nextLine();
		String ans = "No";
		if( s.contains("-") ) {
			String[] arr = s.split("-");
			if( arr.length == 2 ) {
				if( arr[0].length() == a && arr[1].length() == b ) ans = "Yes";
			}
		}
		System.out.println(ans);
	}

}