import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String b = sc.next(); b sc.next() sc.next sc String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No") System.out.println System.out System System.out s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No" s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") s.matches s "[0-9]{" + a + "}-[0-9]{" + b + "}" b "}-[0-9]{" "[0-9]{" + a + "}-[0-9]{" + b + "}" "[0-9]{" a "}-[0-9]{" b "}" "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		String b = sc.next();
		String s = sc.next();
		sc.close();
		System.out.println(s.matches("[0-9]{" + a + "}-[0-9]{" + b + "}") ? "Yes" : "No");
	}
}