import java.util.*;

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();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } 
} import java.util.*; util.* java 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();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } 
} 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();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                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 for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        } int i=0; int i=0; i 0 i<A+B+1 i A+B+1 A+B+1 A B 1 i++ i++ i {
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        } {
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        } if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            } i==A && !S.substring(i,i+1).equals("-") i==A i A !S.substring(i,i+1).equals("-") S.substring(i,i+1).equals("-") S.substring(i,i+1).equals S.substring(i,i+1) S.substring S i i+1 i 1 "-" {
                System.out.println("No");
                break;
            } System.out.println("No") System.out.println System.out System System.out "No" break; if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            } i!=A && S.substring(i,i+1).equals("-") i!=A i A S.substring(i,i+1).equals("-") S.substring(i,i+1).equals S.substring(i,i+1) S.substring S i i+1 i 1 "-" {
                System.out.println("No");
                break;
            } System.out.println("No") System.out.println System.out System System.out "No" break; if(i==A+B){
                System.out.println("Yes");
            } i==A+B i A+B A B {
                System.out.println("Yes");
            } 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){
        Scanner sc = new Scanner(System.in);

        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } 
} 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();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } 
} Main
import java.util.*;

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();

        for(int i=0; i<A+B+1; i++){
            if(i==A && !S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            else if(i!=A && S.substring(i,i+1).equals("-")){
                System.out.println("No");
                break;
            }
            if(i==A+B){
                System.out.println("Yes");
            }
        }
    } 
}