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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	}
} 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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	}
} 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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "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 int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc boolean flag = true; flag true for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} int c = s.charAt(i); c s.charAt(i) s.charAt s i if(c < 48 || c > 57) flag = false; c < 48 || c > 57 c < 48 c 48 c > 57 c 57 flag = false flag false if(s.charAt(a) != '-') flag = false; s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' flag = false flag false for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} int i = a+1; int i = a+1; i a+1 a 1 i < a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		} int c = s.charAt(i); c s.charAt(i) s.charAt s i if(c < 48 || c > 57) flag = false; c < 48 || c > 57 c < 48 c 48 c > 57 c 57 flag = false flag false System.out.println(flag ? "Yes" : "No") System.out.println System.out System System.out flag ? "Yes" : "No" flag "Yes" "No" sc.close() sc.close sc String[] args args 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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	}
} 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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	}
} 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();
		boolean flag = true;

		for(int i = 0; i < a; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}

		if(s.charAt(a) != '-') flag = false;

		for(int i = a+1; i < a+b+1; i++) {
			int c = s.charAt(i);
			if(c < 48 || c > 57) flag = false;
		}
		System.out.println(flag ? "Yes" : "No");
		sc.close();
	}
}