import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    }
    public static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    }
    public static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    } main {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in String S = in.next(); S in.next() in.next in if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No"); isPostCode(S, A, B) isPostCode S A B 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 static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    } isPostCode {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    } if (s == null || s.length() == 0) return false; s == null || s.length() == 0 s == null s null s.length() == 0 s.length() s.length s 0 return false; false if (s.length() != a + b + 1) return false; s.length() != a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 return false; false if (a < 1 || a > 5) return false; a < 1 || a > 5 a < 1 a 1 a > 5 a 5 return false; false if (b < 1 || b > 5) return false; b < 1 || b > 5 b < 1 b 1 b > 5 b 5 return false; false if (s.charAt(a) != '-') return false; s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' return false; false for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } int c = s.charAt(i) - '0'; c s.charAt(i) - '0' s.charAt(i) s.charAt s i '0' if (c < 0 || c > 9) return false; c < 0 || c > 9 c < 0 c 0 c > 9 c 9 return false; false for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } int i = a + 1; int i = a + 1; i a + 1 a 1 i < s.length() i s.length() s.length s i++ i++ i {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        } int c = s.charAt(i) - '0'; c s.charAt(i) - '0' s.charAt(i) s.charAt s i '0' if (c < 0 || c > 9) return false; c < 0 || c > 9 c < 0 c 0 c > 9 c 9 return false; false return true; true String s s int a a int b b public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    }
    public static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    }
    public static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int B = in.nextInt();

        String S = in.next();

        if (isPostCode(S, A, B))
        System.out.println("Yes");
        else
            System.out.println("No");
    }
    public static boolean isPostCode(String s, int a, int b) {
        if (s == null || s.length() == 0) return false;
        if (s.length() != a + b + 1) return false;
        if (a < 1 || a > 5) return false;
        if (b < 1 || b > 5) return false;
        if (s.charAt(a) != '-') return false;
        for (int i = 0; i < a; i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        for (int i = a + 1; i < s.length(); i++) {
            int c = s.charAt(i) - '0';
            if (c < 0 || c > 9) return false;
        }
        return true;
    }
}