import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	}
} import java.util.*; util.* java public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	}
} Main public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	} main {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in String S = in.next(); S in.next() in.next in char[] s_chars = S.toCharArray(); s_chars S.toCharArray() S.toCharArray S int flag = 0; flag 0 if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      } s_chars[A]=='-' s_chars[A] s_chars A '-' {
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      } for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        } int i = 0; int i = 0; i 0 i < A+B+1 i A+B+1 A+B+1 A B 1 i++ i++ i {
          if(s_chars[i]=='-'){flag++;}
        } {
          if(s_chars[i]=='-'){flag++;}
        } if(s_chars[i]=='-'){flag++;} s_chars[i]=='-' s_chars[i] s_chars i '-' {flag++;} flag++ flag if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");} flag==1 flag 1 {System.out.print("Yes");} System.out.print("Yes") System.out.print System.out System System.out "Yes" {System.out.print("No");} System.out.print("No") System.out.print System.out System System.out "No" String[] args args public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	}
} public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	}
} Main
import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
        int B = in.nextInt();
        String S = in.next();
		char[] s_chars = S.toCharArray();
        
      int flag = 0;
      if(s_chars[A]=='-'){
        for(int i = 0;i < A+B+1;i++){
          if(s_chars[i]=='-'){flag++;}
        }
      }
        if(flag==1){System.out.print("Yes");}
        else{System.out.print("No");}
        
	}
}
