import java.util.*;

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[A].equals("-")){
            System.out.println("No");
            return;
        }
        
        for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        System.out.println("Yes");
    }
} import java.util.*; util.* java 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[A].equals("-")){
            System.out.println("No");
            return;
        }
        
        for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        System.out.println("Yes");
    }
} 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[A].equals("-")){
            System.out.println("No");
            return;
        }
        
        for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        System.out.println("Yes");
    } 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[A].equals("-")){
            System.out.println("No");
            return;
        }
        
        for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        System.out.println("Yes");
    } 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[A].equals("-")){
            System.out.println("No");
            return;
        } !s[A].equals("-") s[A].equals("-") s[A].equals s[A] s A "-" {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        } int i=0; int i=0; i 0 i<A i A i++ i++ i {
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        } {
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        } if(s[i].equals("-")){
                System.out.println("No");
                return;
            } s[i].equals("-") s[i].equals s[i] s i "-" {
                System.out.println("No");
                return;
            } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        } int i=1; int i=1; i 1 i<=B i B i++ i++ i {
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        } {
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        } if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            } s[i + A].equals("-") s[i + A].equals s[i + A] s i + A i A "-" {
                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" String[] args args
import java.util.*;

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[A].equals("-")){
            System.out.println("No");
            return;
        }
        
        for(int i=0; i<A; i++){
            if(s[i].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        for(int i=1; i<=B; i++){
            if(s[i + A].equals("-")){
                System.out.println("No");
                return;
            }
        }
        
        System.out.println("Yes");
    }
}