import java.util.Scanner;
import java.util.regex.Pattern;

// Java8
public class Main
{
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws Exception
	{
		new Main().run();
	}

	void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	}
} import java.util.Scanner; Scanner java.util import java.util.regex.Pattern; Pattern java.util.regex public class Main
{
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws Exception
	{
		new Main().run();
	}

	void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception
	{
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	} run {
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}"); ptn Pattern.compile("\\d{" + a + "}-\\d{" + b + "}") Pattern.compile Pattern "\\d{" + a + "}-\\d{" + b + "}" b "}-\\d{" "\\d{" + a + "}-\\d{" + b + "}" "\\d{" a "}-\\d{" b "}" String s = sc.next(); s sc.next() sc.next sc System.out.println(ptn.matcher(s).matches() ? "Yes" : "No") System.out.println System.out System System.out ptn.matcher(s).matches() ? "Yes" : "No" ptn.matcher(s).matches() ptn.matcher(s).matches ptn.matcher(s) ptn.matcher ptn s "Yes" "No" public class Main
{
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws Exception
	{
		new Main().run();
	}

	void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	}
} public class Main
{
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws Exception
	{
		new Main().run();
	}

	void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	}
} Main
import java.util.Scanner;
import java.util.regex.Pattern;

// Java8
public class Main
{
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) throws Exception
	{
		new Main().run();
	}

	void run()
	{
		int a = sc.nextInt();
		int b = sc.nextInt();
		Pattern ptn = Pattern.compile("\\d{" + a + "}-\\d{" + b + "}");
		String s = sc.next();
		System.out.println(ptn.matcher(s).matches() ? "Yes" : "No");
	}
}
