import java.util.*;
import static java.lang.System.out;
public class Main{
   static Scanner sc = new Scanner(System.in);
   public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   }
} import java.util.*; util.* java import static java.lang.System.out; import static java.lang.System.out; import static java.lang.System.out; public class Main{
   static Scanner sc = new Scanner(System.in);
   public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   } main {
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   } 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(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      } S.indexOf("-") == A S.indexOf("-") S.indexOf S "-" A {
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      } try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         } catch(NumberFormatException e){
            System.out.println("No");
         } NumberFormatException e {
            System.out.println("No");
         } System.out.println("No") System.out.println System.out System System.out "No" {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         } Integer.parseInt(S.substring(0,A)) Integer.parseInt Integer S.substring(0,A) S.substring S 0 A Integer.parseInt(S.substring(A+1,S.length())) Integer.parseInt Integer S.substring(A+1,S.length()) S.substring S A+1 A 1 S.length() S.length S System.out.println("Yes") System.out.println System.out System System.out "Yes" {
         out.println("No");
      } out.println("No") out.println out "No" String[] args args public class Main{
   static Scanner sc = new Scanner(System.in);
   public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   }
} public class Main{
   static Scanner sc = new Scanner(System.in);
   public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   }
} Main
import java.util.*;
import static java.lang.System.out;
public class Main{
   static Scanner sc = new Scanner(System.in);
   public static void main(String[] args){
      int A = sc.nextInt();
      int B = sc.nextInt();
      String S = sc.next();
      if(S.indexOf("-") == A){
         try{
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1,S.length()));
            System.out.println("Yes");
         }catch(NumberFormatException e){
            System.out.println("No");
         }
      }else{
         out.println("No");
      }
   }
}