import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception 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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        }
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String ans = "No"; ans "No" String S = sc.next(); S sc.next() sc.next sc String[] s; s try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        } catch(Exception e) {
            System.out.println(ans);
        } Exception e {
            System.out.println(ans);
        } System.out.println(ans) System.out.println System.out System System.out ans {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        } s = S.split("-") s S.split("-") S.split S "-" if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            } s.length == 2 s.length s s.length 2 {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            } if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } s[0].length() == a && s[1].length() == b s[0].length() == a s[0].length() s[0].length s[0] s 0 a s[1].length() == b s[1].length() s[1].length s[1] s 1 b {
                    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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        }
    }

} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception 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 = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        String ans = "No";
        String S = sc.next();
        String[] s;
        try {
            s = S.split("-");
            if(s.length == 2) {
                if(s[0].length() == a && s[1].length() == b) {
                    ans = "Yes";
                } 
            }
            System.out.println(ans);
        }catch(Exception e) {
            System.out.println(ans);
        }
    }

}
