import java.util.*;

public class Main {
    public static void main(String[] args) {
        
        // 定数
        final String RESULT_YES = "Yes";
        final String RESULT_NO = "No";
        
        Scanner sc = new Scanner(System.in);
        //Scanner sc = new Scanner("1 1\r\n999-0000");
        
        // ハイフンより前の文字数
        int postOfficeCode = sc.nextInt();
        // ハイフンより後の文字数
        int locationCode = sc.nextInt();
        // 評価対象文字列
        String val = sc.next();
        
        boolean result = false;
        
        if(val.matches("[0-9]{"+postOfficeCode+"}-[0-9]{"+locationCode+"}")) {
            result = true;
        }
        
        if(result) {
            System.out.println(RESULT_YES);
        } else {
            System.out.println(RESULT_NO);
        }
        
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz