import java.util.*;
import java.util.regex.Pattern;

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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  }
  
} import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex 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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  }
  
} 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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  } main {
  
  Scanner sc = new Scanner(System.in);
  
   int a = sc.nextInt();
   int b = sc.nextInt();
   String s = sc.next();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  } 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 if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  } a>=1 && a<=5 && b>=1 && b<=5 b>=1 a>=1 && a<=5 && b>=1 && b<=5 a>=1 a 1 a<=5 a 5 b>=1 b 1 b<=5 b 5 {
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  } boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s); gouhi Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s) Pattern.matches Pattern "^[0-9]{"+a+"}-[0-9]{"+b+"}$" b "}-[0-9]{" "^[0-9]{"+a+"}-[0-9]{"+b+"}$" "^[0-9]{" a "}-[0-9]{" b "}$" s if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } gouhi == true gouhi true {
      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" {
    System.out.println("入力値に誤りがあります");
  } System.out.println("入力値に誤りがあります") System.out.println System.out System System.out "入力値に誤りがあります" 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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  }
  
} 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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  }
  
} Main
import java.util.*;
import java.util.regex.Pattern;

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();
    
  if(a>=1 && a<=5 && b>=1 && b<=5){
    boolean gouhi = Pattern.matches("^[0-9]{"+a+"}-[0-9]{"+b+"}$",s);
    if(gouhi == true){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }else{
    System.out.println("入力値に誤りがあります");
  }
  }
  
}
