import java.lang.*;
import java.util.*;
import java.io.*;

public class Main {
	

	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	}

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

	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	}

} Main public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	} main {
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	} int a a b; b String str; str Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc str = sc.next() str sc.next() sc.next sc int len = str.length(); len str.length() str.length str boolean tf = true; tf true for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		} int i = 0; int i = 0; i 0 i < len i len ++i ++i i {
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		} {
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		} if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false; i < a && !Character.isDigit(str.charAt(i)) i < a i a !Character.isDigit(str.charAt(i)) Character.isDigit(str.charAt(i)) Character.isDigit Character str.charAt(i) str.charAt str i tf = false tf false if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false; i == a && str.charAt(i) != '-' i == a i a str.charAt(i) != '-' str.charAt(i) str.charAt str i '-' tf = false tf false if (i > a && !Character.isDigit(str.charAt(i))) tf = false; i > a && !Character.isDigit(str.charAt(i)) i > a i a !Character.isDigit(str.charAt(i)) Character.isDigit(str.charAt(i)) Character.isDigit Character str.charAt(i) str.charAt str i tf = false tf false if (a+b+1 != len) tf = false; a+b+1 != len a+b+1 a+b+1 a b 1 len tf = false tf false if (tf) System.out.println("Yes");
		else System.out.println("No"); tf System.out.println("Yes") System.out.println System.out System System.out "Yes" 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 Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	}

} public class Main {
	

	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	}

} Main
import java.lang.*;
import java.util.*;
import java.io.*;

public class Main {
	

	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		int a,b;
		String str;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		str = sc.next();
		int len = str.length();
		boolean tf = true;
		for (int i = 0;i < len;++i)
		{
			if (i < a && !Character.isDigit(str.charAt(i))) tf = false;
			else if (i == a && str.charAt(i) != '-') tf = false;
			else if (i > a && !Character.isDigit(str.charAt(i))) tf = false;
		}
		if (a+b+1 != len) tf = false;
		if (tf) System.out.println("Yes");
		else System.out.println("No");
	}

}
