import java.util.Scanner;




public class Main {

    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    }


}
 import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    }


} Main public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    } main {

    	Main main=new Main();

    	main.run();

    } Main main=new Main(); main new Main() main.run() main.run main String[] args args void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    } run {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}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 str=sc.next(); str sc.next() sc.next sc String[] S=str.split(""); S str.split("") str.split str "" if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		} S[A].equals("-") S[A].equals S[A] S A "-" {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	} int length=str.length(); length str.length() str.length str int lengthnum=str.replaceAll("-","").length(); lengthnum str.replaceAll("-","").length() str.replaceAll("-","").length str.replaceAll("-","") str.replaceAll str "-" "" int diff=length-lengthnum; diff length-lengthnum length lengthnum if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		} diff==1 diff 1 {
    			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" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" public class Main {

    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    }


} public class Main {

    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    }


} Main
import java.util.Scanner;




public class Main {

    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	String str=sc.next();
    	String[] S=str.split("");

    	if(S[A].equals("-")) {

    		int length=str.length();
    		int lengthnum=str.replaceAll("-","").length();

    		int diff=length-lengthnum;

    		if(diff==1) {
    			System.out.println("Yes");
    		}else {
    			System.out.println("No");
    		}

    	}else {
			System.out.println("No");
		}
    }


}

