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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      }
	      System.out.println(ans);
	}
} 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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      }
	      System.out.println(ans);
	} main {
	      Scanner sc = new Scanner(System.in);
	      int a = sc.nextInt();
	      int b = sc.nextInt();
	      String n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+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 n = sc.next(); n sc.next() sc.next sc char c = n.charAt(a); c n.charAt(a) n.charAt n a int l = n.length(); l n.length() n.length n String ans = "No"; ans "No" if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      } (a+b+1) == l && c == ('-') (a+b+1) == l (a+b+1) a+b+1 a b 1 l c == ('-') c ('-') {
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      } ans = "Yes" ans "Yes" for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  } {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  } if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  } n.charAt(i) == '-' n.charAt(i) n.charAt n i '-' {
	    			  ans = "No";
	    		  } ans = "No" ans "No" for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  } {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  } if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  } n.charAt(a+1+i) == '-' n.charAt(a+1+i) n.charAt n a+1+i a+1+i a 1 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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      }
	      System.out.println(ans);
	}
} 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 n = sc.next();
	      char c = n.charAt(a);
	      int l = n.length();
	      String ans = "No";
	      if((a+b+1) == l && c == ('-')){
	    	  ans = "Yes";
	    	  for(int i = 0; i < a; i++) {
	    		  if(n.charAt(i) == '-') {
	    			  ans = "No";
	    		  }
	    	  }
	      for(int i = 0; i < b; i++) {
    		  if(n.charAt(a+1+i) == '-') {
    			  ans = "No";
    		  }
    	  }
      }
	      System.out.println(ans);
	}
}