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 ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	}
} 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 ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("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 ar = sc.next(); ar sc.next() sc.next sc String[] s = ar.split(""); s ar.split("") ar.split ar "" boolean flg = true; flg true for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
                     if( s[i].equals("-")) flg = false;
               } {
                     if( s[i].equals("-")) flg = false;
               } if( s[i].equals("-")) flg = false; s[i].equals("-") s[i].equals s[i] s i "-" flg = false flg false if ( !(s[a].equals("-"))) flg =false; !(s[a].equals("-")) (s[a].equals("-")) s[a].equals s[a] s a "-" flg =false flg false for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               } int i = a+1; int i = a+1; i a+1 a 1 i < a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
                     if( s[i].equals("-") )flg =false;
               } {
                     if( s[i].equals("-") )flg =false;
               } if( s[i].equals("-") )flg =false; s[i].equals("-") s[i].equals s[i] s i "-" flg =false flg false if (flg)                System.out.print("Yes");
             else  System.out.print("No"); flg System.out.print("Yes") System.out.print System.out System System.out "Yes" 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 sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	}
} 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 ar = sc.next();
String[] s = ar.split("");
               boolean flg = true;
		for(int i = 0; i < a; i++){
                     if( s[i].equals("-")) flg = false;
               }
               if ( !(s[a].equals("-"))) flg =false;
		for(int i = a+1; i < a+b+1; i++){
                     if( s[i].equals("-") )flg =false;
               }
              if (flg)                System.out.print("Yes");
             else  System.out.print("No");
	}
}
