import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
} import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex import java.util.regex.Matcher; Matcher java.util.regex public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc int y = sc.nextInt(); y sc.nextInt() sc.nextInt sc String postnumber = sc.next(); postnumber sc.next() sc.next sc Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$"); pattern Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$") Pattern.compile Pattern "^[0-9]{"+x+"}-[0-9]{"+y+"}$" y "}-[0-9]{" "^[0-9]{"+x+"}-[0-9]{"+y+"}$" "^[0-9]{" x "}-[0-9]{" y "}$" Matcher matcher = pattern.matcher(postnumber); matcher pattern.matcher(postnumber) pattern.matcher pattern postnumber if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } matcher.find() matcher.find matcher {
            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" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
} Main
import java.util.*;
import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        String postnumber = sc.next();
        
        
        Pattern pattern = Pattern.compile("^[0-9]{"+x+"}-[0-9]{"+y+"}$");
        Matcher matcher = pattern.matcher(postnumber);
        
        if(matcher.find()){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
        
    }
}
