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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	}
} 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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	}
} 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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	} 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 System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No") System.out.println System.out System System.out s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No" s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) s.matches s String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b) String.format String "^[0-9]{%d}\\-[0-9]{%d}$" a b "Yes" "No" 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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	}
} 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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	}
} 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();
		System.out.println(s.matches(String.format("^[0-9]{%d}\\-[0-9]{%d}$", a, b)) ? "Yes" : "No");
	}
}
