import java.util.Arrays;
import java.util.Scanner;

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

    static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    } main {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    } try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        } {
            solve(sc);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) solve(sc) solve sc String[] args args static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } solve {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String[] s = sc.next().split("-"); s sc.next().split("-") sc.next().split sc.next() sc.next sc "-" if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } s.length == 2 && s[0].length() == a && s[1].length() == b s.length == 2 && s[0].length() == a && s[1].length() == b s.length == 2 s.length s s.length 2 s[0].length() == a s[0].length() s[0].length s[0] s 0 a s[1].length() == b s[1].length() s[1].length s[1] s 1 b {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" Scanner sc sc public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

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

    static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        String[] s = sc.next().split("-");
        if (s.length == 2 && s[0].length() == a && s[1].length() == b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}