import 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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No");
    }
} import java.util.*; util.* java 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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No");
    } main {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        String[] s = scanner.next().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "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().split("-"); s scanner.next().split("-") scanner.next().split scanner.next() scanner.next scanner "-" if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No"); s.length != 2 s.length s s.length 2 System.out.println("No") System.out.println System.out System System.out "No" System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No") System.out.println System.out System System.out s[0].length() == a && s[1].length() == b ? "Yes":"No" s[0].length() == a && s[1].length() == b 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 "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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No");
    }
} Main
import 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().split("-");
        if (s.length != 2) System.out.println("No");
        else System.out.println(s[0].length() == a && s[1].length() == b ? "Yes":"No");
    }
}
