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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    }

    private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }
} 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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    }

    private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }
} 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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        String s = sc.next();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) 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 String s = sc.next(); s sc.next() sc.next sc boolean result = true; result true if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        } s.length()!=A+B+1 s.length() s.length s A+B+1 A+B+1 A B 1 result = false result false if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        } s.charAt(A) != '-' s.charAt(A) s.charAt s A '-' result = false result false {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        } String part1 = s.substring(0, A); part1 s.substring(0, A) s.substring s 0 A String part2 = s.substring(A+1); part2 s.substring(A+1) s.substring s A+1 A 1 if (!checkValid(part1) || !checkValid(part2)) result = false; !checkValid(part1) || !checkValid(part2) !checkValid(part1) checkValid(part1) checkValid part1 !checkValid(part2) checkValid(part2) checkValid part2 result = false result false if (result) System.out.println("Yes");
        else System.out.println("No"); result 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 private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    } checkValid {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    } for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        } {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if (c < '0' || c > '9') {
                return false;
            } c < '0' || c > '9' c < '0' c '0' c > '9' c '9' {
                return false;
            } return false; false return true; true String s s 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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    }

    private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }
} 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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    }

    private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }
} 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();
        boolean result = true;

        if (s.length()!=A+B+1) result = false;
        else if (s.charAt(A) != '-') result = false;
        else {
            String part1 = s.substring(0, A);
            String part2 = s.substring(A+1);
            if (!checkValid(part1) || !checkValid(part2)) result = false;
        }

        if (result) System.out.println("Yes");
        else System.out.println("No");
    }

    private static boolean checkValid(String s) {
        for (int i=0; i<s.length(); i++) {
            char c = s.charAt(i);
            if (c < '0' || c > '9') {
                return false;
            }
        }
        return true;
    }
}