import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main @SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner Pattern p = Pattern.compile("[0-9]+-[0-9]+"); p Pattern.compile("[0-9]+-[0-9]+") Pattern.compile Pattern "[0-9]+-[0-9]+" Matcher m = p.matcher(s); m p.matcher(s) p.matcher p s if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} m.find() && s.charAt(a) == '-' && s.length() == a + b + 1 m.find() && s.charAt(a) == '-' && s.length() == a + b + 1 m.find() m.find m s.charAt(a) == '-' s.charAt(a) s.charAt s a '-' s.length() == a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 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" String args[] args public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		String s = scanner.next();

		Pattern p = Pattern.compile("[0-9]+-[0-9]+");
		Matcher m = p.matcher(s);

		if (m.find() && s.charAt(a) == '-' && s.length() == a + b + 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
