import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

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

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(s) sb.append sb s String aS = sb.substring(0, a); aS sb.substring(0, a) sb.substring sb 0 a char haihun = sb.charAt(a); haihun sb.charAt(a) sb.charAt sb a String bS = sb.substring(a+1, s.length()); bS sb.substring(a+1, s.length()) sb.substring sb a+1 a 1 s.length() s.length s boolean hantei = true; hantei true if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		} aS.matches("[0-9]*") aS.matches aS "[0-9]*" {
			hantei =true;
		} hantei =true hantei true {
			hantei = false;
		} hantei = false hantei false if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		} hantei ==true && haihun == '-' hantei ==true hantei true haihun == '-' haihun '-' {
			hantei  = true;
		} hantei  = true hantei true {
			hantei = false;
			//System.out.println(hantei);
		} hantei = false hantei false if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		} hantei == true && bS.matches("[0-9]*") hantei == true hantei true bS.matches("[0-9]*") bS.matches bS "[0-9]*" {
			hantei  = true;
		} hantei  = true hantei true {
			hantei = false;
		} hantei = false hantei false if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} hantei == true hantei true {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		String s = scan.next();
		StringBuilder sb = new StringBuilder();
		sb.append(s);
		String aS = sb.substring(0, a);
		char haihun = sb.charAt(a);
		String bS = sb.substring(a+1, s.length());

		//System.out.println(aS);
		//System.out.println(haihun);
		//System.out.println(bS);
		boolean hantei = true;
		if(aS.matches("[0-9]*")) {
			hantei =true;
		}else {
			hantei = false;
		}

		if(hantei ==true && haihun == '-') {
			hantei  = true;
		}else {
			hantei = false;
			//System.out.println(hantei);
		}

		if(hantei == true && bS.matches("[0-9]*")) {
			hantei  = true;
		}else {
			hantei = false;
		}

		if(hantei == true) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}

}
