import java.util.Scanner;

class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int flag = 1;
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();

	if(s.length() != a+b+1){
	    flag = 0;
	}
	

	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}


	if(s.charAt(a) != '-'){
	    flag = 0;
	}


	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}

	if(flag == 1){
	    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 scan = new Scanner(System.in);

	int flag = 1;
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();

	if(s.length() != a+b+1){
	    flag = 0;
	}
	

	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}


	if(s.charAt(a) != '-'){
	    flag = 0;
	}


	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int flag = 1;
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();

	if(s.length() != a+b+1){
	    flag = 0;
	}
	

	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}


	if(s.charAt(a) != '-'){
	    flag = 0;
	}


	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    } main {
	Scanner scan = new Scanner(System.in);

	int flag = 1;
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();

	if(s.length() != a+b+1){
	    flag = 0;
	}
	

	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}


	if(s.charAt(a) != '-'){
	    flag = 0;
	}


	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}

	if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int flag = 1; flag 1 int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan String s = scan.next(); s scan.next() scan.next scan if(s.length() != a+b+1){
	    flag = 0;
	} s.length() != a+b+1 s.length() s.length s a+b+1 a+b+1 a b 1 {
	    flag = 0;
	} flag = 0 flag 0 for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} {
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    } '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 = 0;
	    } flag = 0 flag 0 if(s.charAt(a) != '-'){
	    flag = 0;
	} s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' {
	    flag = 0;
	} flag = 0 flag 0 for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} int i = a+1; int i = a+1; i a+1 a 1 i < s.length() i s.length() s.length s i++ i++ i {
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} {
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	} if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    } '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 = 0;
	    } flag = 0 flag 0 if(flag == 1){
	    System.out.println("Yes");
	}else{
	    System.out.println("No");
	} flag == 1 flag 1 {
	    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 scan = new Scanner(System.in);

	int flag = 1;
	int a = scan.nextInt();
	int b = scan.nextInt();
	String s = scan.next();

	if(s.length() != a+b+1){
	    flag = 0;
	}
	

	for(int i = 0; i < a; i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}


	if(s.charAt(a) != '-'){
	    flag = 0;
	}


	for(int i = a+1; i < s.length(); i++){
	    if('0' <= s.charAt(i) && s.charAt(i) <= '9'){
	    }else{
		flag = 0;
	    }
	}

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