import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } main {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    } 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(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        } S.substring(0,A).contains("-") S.substring(0,A).contains S.substring(0,A) S.substring S 0 A "-" {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        } !(S.substring(A,A + 1).contains("-")) (S.substring(A,A + 1).contains("-")) S.substring(A,A + 1).contains S.substring(A,A + 1) S.substring S A A + 1 A 1 "-" {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        } S.substring(A + 1, A + B + 1).contains("-") S.substring(A + 1, A + B + 1).contains S.substring(A + 1, A + B + 1) S.substring S A + 1 A 1 A + B + 1 A + B + 1 A B 1 "-" {
            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 public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        
        if(S.substring(0,A).contains("-")){
            System.out.println("No");
            return;
        }
        if(!(S.substring(A,A + 1).contains("-"))){
            System.out.println("No");
            return;
        }
        if(S.substring(A + 1, A + B + 1).contains("-")){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
    }
}
