import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(scanner.next().matches(String.format("\\d{%d}-\\d{%d}", a, b)) ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {
    static Scanner scanner = new Scanner(System.in);

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

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

    public static void main(String[]$) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(scanner.next().matches(String.format("\\d{%d}-\\d{%d}", a, b)) ? "Yes" : "No");
    }
} Main
import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(scanner.next().matches(String.format("\\d{%d}-\\d{%d}", a, b)) ? "Yes" : "No");
    }
}