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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			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 String S = sc.next(); S sc.next() sc.next sc sc.close() sc.close sc boolean flag = true; flag true for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false; int i = 0; int i = 0; i 0 i < A i A ++i ++i i if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false; if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false; !('0' <= S.charAt(i) && S.charAt(i) <= '9') ('0' <= S.charAt(i) && S.charAt(i) <= '9') '0' <= S.charAt(i) '0' S.charAt(i) S.charAt S i S.charAt(i) <= '9' S.charAt(i) S.charAt S i '9' flag = false flag false if(S.charAt(A) != '-')
			flag = false; S.charAt(A) != '-' S.charAt(A) S.charAt S A '-' flag = false flag false for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false; int i = 0; int i = 0; i 0 i < B i B ++i ++i i if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false; if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false; !('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9') ('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9') '0' <= S.charAt(A + 1 + i) '0' S.charAt(A + 1 + i) S.charAt S A + 1 + i A + 1 + i A 1 i S.charAt(A + 1 + i) <= '9' S.charAt(A + 1 + i) S.charAt S A + 1 + i A + 1 + i A 1 i '9' flag = false flag false if(flag)
			System.out.println("Yes");
		else
			System.out.println("No"); flag System.out.println("Yes") System.out.println System.out System System.out "Yes" 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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			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();
		String S = sc.next();
		sc.close();
		
		boolean flag = true;
		for(int i = 0;i < A;++i)
			if(!('0' <= S.charAt(i) && S.charAt(i) <= '9'))
				flag = false;
		if(S.charAt(A) != '-')
			flag = false;
		for(int i = 0;i < B;++i)
			if(!('0' <= S.charAt(A + 1 + i) && S.charAt(A + 1 + i) <= '9'))
				flag = false;
		if(flag)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}
