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();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String s = sc.next();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        System.out.println("No");
    }
} 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();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String s = sc.next();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        System.out.println("No");
    } 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(); s sc.next() sc.next sc if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        } s.length() == a+b+1 && s.charAt(a) == '-' s.length() == a+b+1 s.length() s.length s a+b+1 a+b+1 a b 1 s.charAt(a) == '-' s.charAt(a) s.charAt s a '-' {
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        } for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          } {
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               } i != a && c == '-' i != a i a c == '-' c '-' {
                   System.out.println("No");
                   return;
               } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" return; 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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String s = sc.next();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        System.out.println("No");
    }
} 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();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        
        String s = sc.next();
        
        if(s.length() == a+b+1 && s.charAt(a) == '-'){
            for(int i = 0; i < s.length(); i++){
               char c = s.charAt(i);
               
               if(i != a && c == '-'){
                   System.out.println("No");
                   return;
               }
          }
          System.out.println("Yes");
          return;
        }
        
        System.out.println("No");
    }
}
