import java.util.*;

public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  }
} Main public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  } main {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String[] S = sc.next().split("-"); S sc.next().split("-") sc.next().split sc.next() sc.next sc "-" if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  } S.length == 2 S.length S S.length 2 {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  } if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  } S[0].length() == A && S[1].length() == B S[0].length() == A S[0].length() S[0].length S[0] S 0 A S[1].length() == B S[1].length() S[1].length S[1] S 1 B {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  } System.out.println("Yes") System.out.println System.out System System.out "Yes" sc.close() sc.close sc System.exit(0) System.exit System 0 System.out.println("No") System.out.println System.out System System.out "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 = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  }
} public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
	  int A = Integer.parseInt(sc.next());
	  int B = Integer.parseInt(sc.next());
	  String[] S = sc.next().split("-");
	  
	  if(S.length == 2) {
		  if(S[0].length() == A && S[1].length() == B) {
			  System.out.println("Yes");
			  sc.close();
			  System.exit(0);
		  }
		  	
	  }
	  
	  System.out.println("No");
	  sc.close();
	  
  }
}
