import java.util.Scanner;

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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    }
} import java.util.Scanner; Scanner 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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    }
} 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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);

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

        boolean isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b)); isAns s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b)) s.matches s String.format("[0-9]{%d}-[0-9]{%d}", a, b) String.format String "[0-9]{%d}-[0-9]{%d}" a b System.out.println(isAns ? "Yes" : "No") System.out.println System.out System System.out isAns ? "Yes" : "No" isAns "Yes" "No" String[] args args 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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    }
} 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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    }
} Main
import java.util.Scanner;

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 isAns = s.matches(String.format("[0-9]{%d}-[0-9]{%d}", a, b));

        System.out.println(isAns ? "Yes" : "No");
    }
}
