
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	}
} Main public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	} main {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	} Scanner stdin=new Scanner(System.in); stdin new Scanner(System.in) int  a=stdin.nextInt(); a stdin.nextInt() stdin.nextInt stdin int  b=stdin.nextInt(); b stdin.nextInt() stdin.nextInt stdin String s=stdin.next(); s stdin.next() stdin.next stdin char c[]=s.toCharArray(); c s.toCharArray() s.toCharArray s int flag=0; flag 0 if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		} a>5 || b>5 a>5 a 5 b>5 b 5 {
			//			System.out.println("No");
			flag=1;
		} flag=1 flag 1 if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		} c[a]!='-' || c.length!=a+b+1 c[a]!='-' c[a] c a '-' c.length!=a+b+1 c.length c c.length a+b+1 a+b+1 a b 1 {
			//			System.out.println("No");
			flag=1;
		} flag=1 flag 1 for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			if(c[i]=='-')
				flag=1;
		} {
			if(c[i]=='-')
				flag=1;
		} if(c[i]=='-')
				flag=1; c[i]=='-' c[i] c i '-' flag=1 flag 1 for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		} int i=a+1; int i=a+1; i a+1 a 1 i<a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
			if(c[i]=='-')
				flag=1;
		} {
			if(c[i]=='-')
				flag=1;
		} if(c[i]=='-')
				flag=1; c[i]=='-' c[i] c i '-' flag=1 flag 1 if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes"); flag==1 flag 1 System.out.println("No") System.out.println System.out System System.out "No" if(flag!=1)
			System.out.println("Yes"); flag!=1 flag 1 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main{

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	}
} public class Main{

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	}
} Main

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		int  a=stdin.nextInt();
		int  b=stdin.nextInt();
		String s=stdin.next();
		char c[]=s.toCharArray();
		int flag=0;
//		for(int i=0;i<c.length;i++)
//			System.out.println(c[i]);

		if(a>5 || b>5){
			//			System.out.println("No");
			flag=1;
		}
		if(c[a]!='-' || c.length!=a+b+1){
			//			System.out.println("No");
			flag=1;
		}
		for(int i=0;i<a;i++){
			if(c[i]=='-')
				flag=1;
		}
		for(int i=a+1;i<a+b+1;i++){
			if(c[i]=='-')
				flag=1;
		}


		if(flag==1)
			System.out.println("No");
		else if(flag!=1)
			System.out.println("Yes");
	}
}