import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    } main {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    } 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 ans = true; ans true String strings[] = s.split("-"); strings s.split("-") s.split s "-" if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false; strings.length != 2 strings.length strings strings.length 2 ans = false ans false if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false; strings[0].length() != a strings[0].length() strings[0].length strings[0] strings 0 a ans = false ans false if(strings[1].length() != b)
            ans = false; strings[1].length() != b strings[1].length() strings[1].length strings[1] strings 1 b ans = false ans false if(ans)
            System.out.println("Yes");
        else
            System.out.println("No"); ans System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc return; String[] args args public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    }
} public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String s = sc.next();

        Boolean ans = true;
        String strings[] = s.split("-");
        if(strings.length != 2)
            ans = false;
        else if(strings[0].length() != a)
            ans = false;
        else if(strings[1].length() != b)
            ans = false;

        if(ans)
            System.out.println("Yes");
        else
            System.out.println("No");
        sc.close();
        return;
    }
}
