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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        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 String[] postal = s.split("-"); postal s.split("-") s.split s "-" if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        } postal.length == 2 && postal[0].length() == a && postal[1].length() == b postal.length == 2 && postal[0].length() == a && postal[1].length() == b postal.length == 2 postal.length postal postal.length 2 postal[0].length() == a postal[0].length() postal[0].length postal[0] postal 0 a postal[1].length() == b postal[1].length() postal[1].length postal[1] postal 1 b {
            System.out.println("Yes");
            return;
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("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();
        String[] postal = s.split("-");
        if (postal.length == 2 && postal[0].length() == a && postal[1].length() == b) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }

}
