import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("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(); S scanner.next() scanner.next scanner String[] sArray=S.split("-"); sArray S.split("-") S.split S "-" if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        } sArray.length!=2 sArray.length sArray sArray.length 2 {
            System.out.println("No");
            System.exit(0);
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } sArray[0].length()==A&&sArray[1].length()==B sArray[0].length()==A sArray[0].length() sArray[0].length sArray[0] sArray 0 A sArray[1].length()==B sArray[1].length() sArray[1].length sArray[1] sArray 1 B {
            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 scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        String S=scanner.next();
        String[] sArray=S.split("-");
        if(sArray.length!=2){
            System.out.println("No");
            System.exit(0);
        }
        if(sArray[0].length()==A&&sArray[1].length()==B){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}