
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int mae=sc.nextInt();
		int ato=sc.nextInt();

		String moji=sc.next();
		String[] aa=moji.split("-");
		if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int mae=sc.nextInt();
		int ato=sc.nextInt();

		String moji=sc.next();
		String[] aa=moji.split("-");
		if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int mae=sc.nextInt();
		int ato=sc.nextInt();

		String moji=sc.next();
		String[] aa=moji.split("-");
		if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	} main {
		Scanner sc=new Scanner(System.in);
		int mae=sc.nextInt();
		int ato=sc.nextInt();

		String moji=sc.next();
		String[] aa=moji.split("-");
		if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int mae=sc.nextInt(); mae sc.nextInt() sc.nextInt sc int ato=sc.nextInt(); ato sc.nextInt() sc.nextInt sc String moji=sc.next(); moji sc.next() sc.next sc String[] aa=moji.split("-"); aa moji.split("-") moji.split moji "-" if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		} aa.length==2 && aa[0].length()==mae && aa[1].length()==ato aa.length==2 && aa[0].length()==mae && aa[1].length()==ato aa.length==2 aa.length aa aa.length 2 aa[0].length()==mae aa[0].length() aa[0].length aa[0] aa 0 mae aa[1].length()==ato aa[1].length() aa[1].length aa[1] aa 1 ato {
			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

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int mae=sc.nextInt();
		int ato=sc.nextInt();

		String moji=sc.next();
		String[] aa=moji.split("-");
		if(aa.length==2 && aa[0].length()==mae && aa[1].length()==ato) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
}