import 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    }
} import java.util.*; util.* java 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    }
} 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    } main {
    	Scanner sc = new Scanner(System.in);
    	int A = sc.nextInt();
    	int B = sc.nextInt();
    	String S = sc.next();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    } 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 String ans = "Yes"; ans "Yes" for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	} {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	} if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		} (i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-') (i == A && S.charAt(i) != '-') i == A i A S.charAt(i) != '-' S.charAt(i) S.charAt S i '-' (i != A && S.charAt(i) == '-') i != A i A S.charAt(i) == '-' S.charAt(i) S.charAt S i '-' {
    				ans = "No";
    		} ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    }
} 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    }
} Main
import 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();
    	String ans = "Yes";
    	for (int i = 0; i < S.length(); i++) {
    		if ((i == A && S.charAt(i) != '-') || (i != A && S.charAt(i) == '-')) {
    				ans = "No";
    		}
    	}
    	System.out.println(ans);
    }
}