import java.util.Scanner;

public class Main {
    public static void main (String [] args){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String [] args){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main public static void main (String [] args){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    } 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 flag = true; flag true String[] w =S.split("-"); w S.split("-") S.split S "-" if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        } w.length != 2 w.length w w.length 2 {
            flag = false;
        } flag = false flag false {
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        } if(w[0].length() !=A){
                flag = false;
            } w[0].length() !=A w[0].length() w[0].length w[0] w 0 A {
                flag = false;
            } flag = false flag false if(w[1].length() != B){
                flag = false;
            } w[1].length() != B w[1].length() w[1].length w[1] w 1 B {
                flag = false;
            } flag = false flag false if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } flag {
            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){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main (String [] args){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main (String [] args){
        Scanner sc = new Scanner(System.in);
        int A =sc.nextInt();
        int B =sc.nextInt();
        String S =sc.next();
        boolean flag = true;
        String[] w =S.split("-");
        if (w.length != 2){
            flag = false;
        }else{
            if(w[0].length() !=A){
                flag = false;
            }
            if(w[1].length() != B){
                flag = false;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}
