import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    } 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().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("No");
        }else{
            System.out.println("Yes");
        } 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("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    }
} Main
import java.util.*;
import java.io.*;
import java.math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        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("No");
        }else{
            System.out.println("Yes");
        }
    }
}
