import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner 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();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("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 boolean ans = true; ans true String s = sc.next(); s sc.next() sc.next sc char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
} c[a]!='-'||s.length()!=a+b+1 c[a]!='-' c[a] c a '-' s.length()!=a+b+1 s.length() s.length s a+b+1 a+b+1 a b 1 {
	ans=false;
} ans=false ans false for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
} int i=0; int i=0; i 0 i<=s.length()-1 i s.length()-1 s.length() s.length s 1 i++ i++ i {
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
} {
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
} if(i!=a&&c[i]=='-'){
		ans=false;
	} i!=a&&c[i]=='-' i!=a i a c[i]=='-' c[i] c i '-' {
		ans=false;
	} ans=false ans false if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} ans {
			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 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		boolean ans = true;
		String s = sc.next();
		char c[] = s.toCharArray();
if(c[a]!='-'||s.length()!=a+b+1){
	ans=false;
}
for(int i=0;i<=s.length()-1;i++){
	if(i!=a&&c[i]=='-'){
		ans=false;
	}
}
		if (ans) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}