import 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();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} import java.util.*; util.* java 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();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("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();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s =  sc.next();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("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 char h = '-'; h '-' char p = (s.charAt(a)); p (s.charAt(a)) s.charAt s a int result1 = 0; result1 0 int result2 = 0; result2 0 int ss = s.length(); ss s.length() s.length s if(h==p){
      result1 =1;
    } h==p h p {
      result1 =1;
    } result1 =1 result1 1 String ints = s.replaceAll("[^\\d]", ""); ints s.replaceAll("[^\\d]", "") s.replaceAll s "[^\\d]" "" if((ints.length())==(a+b)){
      result2 = 1;
    } (ints.length())==(a+b) (ints.length()) ints.length ints (a+b) a b {
      result2 = 1;
    } result2 = 1 result2 1 if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } (result1 == 1) && (result2 == 1) && (ss== a+b+1 ) (result1 == 1) && (result2 == 1) && (ss== a+b+1 ) (result1 == 1) result1 1 (result2 == 1) result2 1 (ss== a+b+1 ) ss a+b+1 a+b+1 a b 1 {
      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){
    Scanner sc = new Scanner(System.in);
    
    int a = sc.nextInt();
    int b = sc.nextInt();
    String s =  sc.next();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("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();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main
import 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();;
    char h = '-';
    char p = (s.charAt(a));
    int result1 = 0;
    int result2 = 0;
    int ss = s.length();

    if(h==p){
      result1 =1;
    }
    
    String ints = s.replaceAll("[^\\d]", "");
    if((ints.length())==(a+b)){
      result2 = 1;
    }
       
    if((result1 == 1) && (result2 == 1) && (ss== a+b+1 )){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}