import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int b = Integer.parseInt(sc.next()); b Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No") System.out.println System.out System System.out !s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No" !s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") !s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") !s.substring(0, a).contains("-") s.substring(0, a).contains("-") s.substring(0, a).contains s.substring(0, a) s.substring s 0 a "-" s.charAt(a) == ('-') s.charAt(a) s.charAt s a ('-') !s.substring(a+1).contains("-") s.substring(a+1).contains("-") s.substring(a+1).contains s.substring(a+1) s.substring s a+1 a 1 "-" "Yes" "No" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	}
} Main
import java.util.*;
//import java.util.stream.Collectors;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		String s = sc.next();
		
		System.out.println(!s.substring(0, a).contains("-") && s.charAt(a) == ('-') && !s.substring(a+1).contains("-") ? "Yes" : "No");
	}
}
