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();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        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 = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        System.out.println("Yes");
                } else {
                        System.out.println("No");
                }
        }
} Main public static void main(String args[]) {
                Scanner sc = new Scanner(System.in);
                int A = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        System.out.println("Yes");
                } else {
                        System.out.println("No");
                }
        } main {
                Scanner sc = new Scanner(System.in);
                int A = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        System.out.println("Yes");
                } else {
                        System.out.println("No");
                }
        } 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 sc.nextLine() sc.nextLine sc String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc String[] arStr = S.split("-"); arStr S.split("-") S.split S "-" if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        System.out.println("Yes");
                } else {
                        System.out.println("No");
                } S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B arStr[0].length() == A S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B S.length() == A + B + 1 S.length() S.length S A + B + 1 A + B + 1 A B 1 arStr.length == 2 arStr.length arStr arStr.length 2 arStr[0].length() == A arStr[0].length() arStr[0].length arStr[0] arStr 0 A arStr[1].length() == B arStr[1].length() arStr[1].length arStr[1] arStr 1 B {
                        System.out.println("Yes");
                } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
                        System.out.println("No");
                } 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 = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        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 = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        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 = sc.nextInt();
                int B = sc.nextInt();
                sc.nextLine();
                String S = sc.nextLine();
                String[] arStr = S.split("-");
                if (S.length() == A + B + 1 &&
                                arStr.length == 2 &&
                                arStr[0].length() == A &&
                                arStr[1].length() == B)
                {
                        System.out.println("Yes");
                } else {
                        System.out.println("No");
                }
        }
}
