import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    } main {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner String regex = "(\\d){" + a + "}-(\\d){" + b + "}"; regex "(\\d){" + a + "}-(\\d){" + b + "}" b "}-(\\d){" "(\\d){" + a + "}-(\\d){" + b + "}" "(\\d){" a "}-(\\d){" b "}" System.out.println(s.matches(regex) ? "Yes" : "No") System.out.println System.out System System.out s.matches(regex) ? "Yes" : "No" s.matches(regex) s.matches s regex "Yes" "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String s = scanner.next();

        String regex = "(\\d){" + a + "}-(\\d){" + b + "}";

        System.out.println(s.matches(regex) ? "Yes" : "No");

    }
}