import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    } main {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan boolean out = false; out false if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        } s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' {
            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 for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        } int i = 0; int i = 0; i 0 i <= a + b i a + b a b i++ i++ i {
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        } {
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        } if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            } i != a && s.charAt(i) == '-' i != a i a s.charAt(i) == '-' s.charAt(i) s.charAt s i '-' {
                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 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) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        String s = scan.next();
        boolean out = false;
        if(s.charAt(a) != '-'){
            System.out.println("No");
            System.exit(0);
        }
        for(int i = 0; i <= a + b; i++){
            if(i != a && s.charAt(i) == '-'){
                System.out.println("No");
                System.exit(0);
            }
        }
        System.out.println("Yes");
    }
}