import java.util.*;
// warm-up
// Have to check the post hyphen string for digit as well.
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	} solve {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc i=A+1; i A+1 A 1 String s = sc.next(); s sc.next() sc.next sc boolean ok = s.charAt(A)=='-'; ok s.charAt(A)=='-' s.charAt(A) s.charAt s A '-' if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++)); ok while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++)); i<A+B+1 i A+B+1 A+B+1 A B 1 ok&=Character.isDigit(s.charAt(i++)) ok Character.isDigit(s.charAt(i++)) Character.isDigit Character s.charAt(i++) s.charAt s i++ i i=0 i 0 if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++)); ok while (i<A) ok&=Character.isDigit(s.charAt(i++)); i<A i A ok&=Character.isDigit(s.charAt(i++)) ok Character.isDigit(s.charAt(i++)) Character.isDigit Character s.charAt(i++) s.charAt s i++ i System.out.println(ok ? "Yes" : "No") System.out.println System.out System System.out ok ? "Yes" : "No" ok "Yes" "No" sc.close() sc.close sc public static void main(String args[]) {
		solve();
	} main {
		solve();
	} solve() solve String args[] args public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main
import java.util.*;
// warm-up
// Have to check the post hyphen string for digit as well.
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt(), B = sc.nextInt(), i=A+1;
		String s = sc.next();
		boolean ok = s.charAt(A)=='-';
		if (ok) while (i<A+B+1) ok&=Character.isDigit(s.charAt(i++));
		i=0;
		if (ok) while (i<A) ok&=Character.isDigit(s.charAt(i++));
		System.out.println(ok ? "Yes" : "No");
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

}