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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    }
} 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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    }
} 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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String S = sc.next();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    } 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 String ans = "No"; ans "No" sc.close() sc.close sc try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        } catch(NumberFormatException e){
        } NumberFormatException e {
        } {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        } Integer.parseInt(S.substring(0,A)) Integer.parseInt Integer S.substring(0,A) S.substring S 0 A Integer.parseInt(S.substring(A+1)) Integer.parseInt Integer S.substring(A+1) S.substring S A+1 A 1 if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            } S.length() == A+B+1 S.length() S.length S A+B+1 A+B+1 A B 1 {
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            } if (S.charAt(A) == '-'){
                    ans = "Yes";
                } S.charAt(A) == '-' S.charAt(A) S.charAt S A '-' {
                    ans = "Yes";
                } ans = "Yes" ans "Yes" System.out.println(ans) System.out.println System.out System System.out ans 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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    }
} 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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    }
} 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();
        String ans = "No";
        sc.close();
        try {
            Integer.parseInt(S.substring(0,A));
            Integer.parseInt(S.substring(A+1));
            if (S.length() == A+B+1){
                if (S.charAt(A) == '-'){
                    ans = "Yes";
                }
            }
        }
        catch(NumberFormatException e){
        }
        System.out.println(ans);
    }
}