import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else 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,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        int A,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A A B B accept=0; accept 0 String S; S A=sc.nextInt() A sc.nextInt() sc.nextInt sc B=sc.nextInt() B sc.nextInt() sc.nextInt sc S=sc.next() S sc.next() sc.next sc for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        } int a=0; int a=0; a 0 a<A+B+1 a A+B+1 A+B+1 A B 1 a++ a++ a {
            if(S.charAt(a)=='-') accept++;
        } {
            if(S.charAt(a)=='-') accept++;
        } if(S.charAt(a)=='-') accept++; S.charAt(a)=='-' S.charAt(a) S.charAt S a '-' accept++ accept if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No"); S.charAt(A)=='-'&&accept==1 S.charAt(A)=='-' S.charAt(A) S.charAt S A '-' accept==1 accept 1 System.out.println("Yes") System.out.println System.out System System.out "Yes" 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,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No");
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int A,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else 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,B,accept=0;
        String S;
        A=sc.nextInt();
        B=sc.nextInt();
        S=sc.next();
        for(int a=0;a<A+B+1;a++){
            if(S.charAt(a)=='-') accept++;
        }
        if(S.charAt(A)=='-'&&accept==1) System.out.println("Yes");
        else System.out.println("No");
    }
}